Skip to content

Commit

Permalink
Merge branch 'main' into adamgayoso-patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgayoso authored Aug 21, 2024
2 parents 2175e94 + 7482c06 commit 14517ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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())

0 comments on commit 14517ed

Please sign in to comment.