Skip to content

Commit

Permalink
Merge pull request #45 from canergen/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
emdann authored Oct 27, 2023
2 parents 49db7b8 + 7443eb6 commit 296b5bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion milopy/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ def make_nhoods(
knn_graph = adata.obsp[neighbors_key + "_connectivities"].copy()

# Get reduced dim
X_dimred = adata.obsm[use_rep]
if use_rep == 'X':
X_dimred = adata.X
if scipy.sparse.issparse(X_dimred):
X_dimred = X_dimred.A
else:
X_dimred = adata.obsm[use_rep]

# Sample size
n_ixs = int(np.round(adata.n_obs * prop))
Expand Down

0 comments on commit 296b5bf

Please sign in to comment.