Skip to content

Commit

Permalink
Fix choice
Browse files Browse the repository at this point in the history
Signed-off-by: zethson <lukas.heumos@posteo.net>
  • Loading branch information
Zethson committed Dec 11, 2024
1 parent 6a63c60 commit b6028a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/tools/_distances/test_distances.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def adata(request):
else:
adata = sc.pp.subsample(adata, 0.001, copy=True)

adata = adata[:, np.random.Generator.choice(adata.n_vars, 100, replace=False)].copy()
rng = np.random.default_rng()
adata = adata[:, rng.choice(adata.n_vars, 100, replace=False)].copy()

adata.layers["lognorm"] = adata.X.copy()
adata.layers["counts"] = np.round(adata.X.toarray()).astype(int)
Expand Down

0 comments on commit b6028a7

Please sign in to comment.