You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of anndata.
(optional) I have confirmed this bug exists on the master branch of anndata.
Report
scipy updated to 0.15.0 recently, and as a result, we have a test that fails now:
example:
Code:
from scipy.sparse import csr_matrix #scipy 1.15.0
import anndata as ad #anndata 1.11.1
import numpy as np
import os
counts = csr_matrix(np.random.poisson(1, size=(100, 2000)), dtype=np.float32)
adata = ad.AnnData(counts)
path = os.path.join(".", "test_data2.h5ad")
adata.write_h5ad(path)
adata = ad.read_h5ad(path, backed="r") #also r+ fails
adata.X[:100] #fail
Traceback:
Traceback (most recent call last):
File "<input>", line 11, in <module>
File "/opt/miniconda3/envs/scvi/lib/python3.12/site-packages/anndata/_core/sparse_dataset.py", line 431, in __getitem__
sub = self.to_memory()[row_sp_matrix_validated, col_sp_matrix_validated]
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/scvi/lib/python3.12/site-packages/scipy/sparse/_index.py", line 30, in __getitem__
index, new_shape = self._validate_indices(key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/scvi/lib/python3.12/site-packages/scipy/sparse/_index.py", line 274, in _validate_indices
idx = self._asindices(idx, N)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/scvi/lib/python3.12/site-packages/scipy/sparse/_index.py", line 316, in _asindices
max_indx = x.max()
^^^^^^^
File "/opt/miniconda3/envs/scvi/lib/python3.12/site-packages/numpy/_core/_methods.py", line 44, in _amax
return umr_maximum(a, axis, None, out, keepdims, initial, where)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>=' not supported between instances of 'int' and 'NoneType'
This is used to work with scipy 0.14.1
Versions
anndata1.11.1scipy1.15.0
The text was updated successfully, but these errors were encountered:
Please make sure these conditions are met
Report
scipy updated to 0.15.0 recently, and as a result, we have a test that fails now:
example:
Code:
Traceback:
This is used to work with scipy 0.14.1
Versions
The text was updated successfully, but these errors were encountered: