We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0952258 commit 4ba8a3dCopy full SHA for 4ba8a3d
1 file changed
src/anndata/_core/merge.py
@@ -181,6 +181,15 @@ def equal_sparse(a, b) -> bool:
181
# Comparison broken for CSC matrices
182
# https://github.com/cupy/cupy/issues/7757
183
a, b = CupyCSRMatrix(a), CupyCSRMatrix(b)
184
+ if Version(scipy.__version__) >= Version("1.16.0rc1"):
185
+ # TODO: https://github.com/scipy/scipy/issues/23068
186
+ return bool(
187
+ a.format == b.format
188
+ and (a.shape == b.shape)
189
+ and np.all(a.indptr == b.indptr)
190
+ and np.all(a.indices == b.indices)
191
+ and np.all((a.data == b.data) | (np.isnan(a.data) & np.isnan(b.data)))
192
+ )
193
comp = a != b
194
if isinstance(comp, bool):
195
return not comp
0 commit comments