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
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Cell In[4], line 1
----> 1 ad.AnnData(np.ones((3, 3)))[:, []].X
File ~/github/anndata/anndata/_core/anndata.py:656, in AnnData.X(self)
653 X =None654elifself.is_view:
655 X = as_view(
--> 656 _subset(self._adata_ref.X, (self._oidx, self._vidx)),
657 ElementRef(self, "X"),
658 )
659else:
660 X =self._X
File /usr/local/Cellar/python@3.9/3.9.18/Frameworks/Python.framework/Versions/3.9/lib/python3.9/functools.py:888, in singledispatch.<locals>.wrapper(*args, **kw)
884ifnot args:
885raiseTypeError(f'{funcname} requires at least '886'1 positional argument')
--> 888 return dispatch(args[0].__class__)(*args, **kw)
File ~/github/anndata/anndata/_core/index.py:144, in _subset(a, subset_idx)
142ifall(isinstance(x, cabc.Iterable) for x in subset_idx):
143 subset_idx = np.ix_(*subset_idx)
--> 144 return a[subset_idx]
IndexError: arrays used as indices must be of integer (or boolean) type
Works when X is sparse. Probably not a super common use case.
Versions
-----
IPython 8.14.0
anndata 0.10.0rc2.dev2+gfa8149d9.d20230927
numpy 1.24.4
session_info 1.0.0
-----
asciitree NA
asttokens NA
awkward 2.3.1
awkward_cpp NA
backcall 0.2.0
cloudpickle 2.2.1
colorama 0.4.6
cython_runtime NA
cytoolz 0.10.1
dask 2023.9.1
dateutil 2.8.2
decorator 5.1.0
entrypoints 0.3
exceptiongroup 1.0.4
executing 0.8.2
fasteners 0.17.3
google NA
h5py 3.9.0
importlib_metadata NA
jedi 0.18.1
jinja2 3.1.1
llvmlite 0.40.1
markupsafe 2.1.1
msgpack 1.0.3
natsort 8.3.0
numba 0.57.1
numcodecs 0.10.2
numexpr 2.8.1
packaging 23.1
pandas 2.1.0
parso 0.8.2
pexpect 4.8.0
pickleshare 0.7.5
prompt_toolkit 3.0.38
psutil 5.9.0
ptyprocess 0.7.0
pure_eval 0.2.1
pyarrow 12.0.1
pygments 2.16.1
pytz 2022.7.1
regex 2.5.112
ruamel NA
scipy 1.11.2
setuptools_scm NA
sitecustomize NA
six 1.16.0
sparse 0.14.0
sphinxcontrib NA
stack_data 0.1.4
tblib 1.7.0
tlz 0.10.1
toolz 0.12.0
traitlets 5.6.0
typing_extensions NA
wcwidth 0.2.5
xxhash NA
yaml 5.4.1
zappy NA
zarr 2.16.1
zipp NA
zoneinfo NA
-----
Python 3.9.18 (main, Aug 24 2023, 21:32:48) [Clang 14.0.3 (clang-1403.0.22.14.1)]
macOS-13.4.1-x86_64-i386-64bit
-----
Session information updated at 2023-09-27 12:34
The text was updated successfully, but these errors were encountered:
Please make sure these conditions are met
Report
Code:
Traceback:
Works when X is sparse. Probably not a super common use case.
Versions
The text was updated successfully, but these errors were encountered: