Skip to content

Commit

Permalink
debug bin_matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sichao25 committed Jul 23, 2024
1 parent 2521a7c commit a4c36d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spateo/io/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def bin_matrix(X: Union[np.ndarray, spmatrix], binsize: int) -> Union[np.ndarray
def _bin_sparse(X):
nz = X.nonzero()
x, y = nz
data = X[nz].toarray().flatten()
data = X[nz].A.flatten()
x_bin = bin_indices(x, 0, binsize)
y_bin = bin_indices(y, 0, binsize)
return csr_matrix((data, (x_bin, y_bin)), shape=shape, dtype=X.dtype)
Expand Down

0 comments on commit a4c36d6

Please sign in to comment.