We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5628b6 commit 2e9cfcaCopy full SHA for 2e9cfca
1 file changed
src/anndata/_core/merge.py
@@ -189,6 +189,15 @@ def equal_sparse(a, b) -> bool:
189
# Comparison broken for CSC matrices
190
# https://github.com/cupy/cupy/issues/7757
191
a, b = CupyCSRMatrix(a), CupyCSRMatrix(b)
192
+ if Version(scipy.__version__) >= Version("1.16.0rc1"):
193
+ # TODO: https://github.com/scipy/scipy/issues/23068
194
+ return bool(
195
+ a.format == b.format
196
+ and (a.shape == b.shape)
197
+ and np.all(a.indptr == b.indptr)
198
+ and np.all(a.indices == b.indices)
199
+ and np.all((a.data == b.data) | (np.isnan(a.data) & np.isnan(b.data)))
200
+ )
201
comp = a != b
202
if isinstance(comp, bool):
203
return not comp
0 commit comments