mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 00:58:11 +08:00
@@ -304,7 +304,7 @@ class ScanpyEngine(CXGDriver):
|
|||||||
if sparse.issparse(X): # use tuned getcol/hstack for performance
|
if sparse.issparse(X): # use tuned getcol/hstack for performance
|
||||||
indices = np.nonzero(var_mask)[0]
|
indices = np.nonzero(var_mask)[0]
|
||||||
cols = [X.getcol(i) for i in indices]
|
cols = [X.getcol(i) for i in indices]
|
||||||
return sparse.hstack(cols)
|
return sparse.hstack(cols, format="csc")
|
||||||
else: # else, just use standard slicing, which is fine for dense arrays
|
else: # else, just use standard slicing, which is fine for dense arrays
|
||||||
return X[:, var_mask]
|
return X[:, var_mask]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user