Fixing redundant np.asarray(X.toarray()) in metrics