Skip to content

Commit

Permalink
fix py310 .A to .toarray()
Browse files Browse the repository at this point in the history
  • Loading branch information
zihuaihuai committed Oct 1, 2024
1 parent f5194dc commit a32da05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brainspace/tests/test_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ def test_mesh_elements():
d2 = me.get_immediate_distance(s, metric='sqeuclidean')
d_sq = d.copy()
d_sq.data **= 2
assert np.allclose(d_sq.A, d2.A)
assert np.allclose(d_sq.toarray(), d2.toarray())

rd = me.get_ring_distance(s)
assert rd.dtype == np.float64
assert np.allclose(d.A, rd.A)
assert np.allclose(d.toarray(), rd.toarray())

rd2 = me.get_ring_distance(s, n_ring=2)
assert (rd2 - d).nnz > 0
Expand Down

0 comments on commit a32da05

Please sign in to comment.