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
After updating from anndata==0.6.18 => anndata==0.6.22.post1 I encounter the following error whenever I try to subset an AnnData object using boolean indices
adata=anndata.AnnData(...)
print(adata.shape[0])
# returns: Nbidx=adata.obs[some_variable] ==some_valuesubset=adata[bidx, :].copy()
print(subset.shape[0])
# returns: Msecond_bidx=subset.obs[some_variable1] ==some_value1subset[second_bidx, :]
# boolean index did not match indexed array along dimension 0, dimension is N, boolean index in M
This appears to be an issue with subsetting the .raw attribute, because everything works fine if I set
Activity
ivirshup commentedon Jul 12, 2019
Thanks for the bug report!
On the current release, on my machine, this doesn't throw the error:
This does:
This error occurs at least as far back as
0.6.20, but does not occur under #164.gokceneraslan commentedon Jul 26, 2019
I hit this bug too. Here is a simpler code to reproduce this:
The error goes away if you do not index the gene dimension:
ivirshup commentedon Jul 31, 2019
Thanks @gokceneraslan!
Now that #164 is merged, this is fixed on master.
jacobkimmel commentedon Jul 31, 2019
Awesome, thanks @ivirshup!
Feel free to close.