Skip to content

Commit f3e3d50

Browse files
committed
force csr_matrix (not array)
1 parent a1bf876 commit f3e3d50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chemap/fingerprint_computation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ def _compute_sklearn(
593593
# folded=True
594594
if cfg.return_csr:
595595
if sp.issparse(X):
596-
X_csr = X.tocsr().astype(np.float32)
596+
X_csr = sp.csr_matrix(X, dtype=np.float32)
597597
else:
598598
X_csr = sp.csr_matrix(np.asarray(X, dtype=np.float32), dtype=np.float32)
599599

0 commit comments

Comments
 (0)