Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new scanpy umap connectivity fn in test #170

Merged
merged 3 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning][].

- Add `progress_bar` argument to {class}`scib_metrics.benchmark.Benchmarker` {pr}`152`.

### Fixed

- Fix neighbors connectivities in test to use new scanpy fn {pr}`170`.

## 0.5.1 (2024-02-23)

### Changed
Expand Down
7 changes: 3 additions & 4 deletions tests/test_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ def test_neighbors_results(n):
new_connect = neigh_result.knn_graph_connectivities
new_dist = neigh_result.knn_graph_distances

sc_dist, sc_connect = sc.neighbors._compute_connectivities_umap(
neigh_result.indices[:, :n], neigh_result.distances[:, :n], adata.n_obs, n_neighbors=n
sc_connect = sc.neighbors._connectivity.umap(
neigh_result.indices[:, :n], neigh_result.distances[:, :n], n_obs=adata.n_obs, n_neighbors=n
)

np.testing.assert_allclose(new_dist.A, sc_dist.A)
np.testing.assert_allclose(new_connect.A, sc_connect.A)
np.testing.assert_allclose(new_connect.toarray(), sc_connect.toarray())
Loading