Comments (7)
Would you want to bundle this fix along with #1319?
from anndata.
I will make a separate PR into that PR, just to make things neat for review. But I think they should go in separate commits to main
to make the blame on github more legible (I use it a lot, so appreciate a clean blame).
from anndata.
@ivirshup What's up here? This is a little strange to me, and happens independent of format (csr/csc)
assert X[np.zeros(X.shape[0], dtype=bool), np.zeros(X.shape[1], dtype=bool)].shape == (1, 0)
It does seem possible to make one:
sparse.csr_matrix((0,0))
I did find this but no explanation of why https://github.com/scipy/scipy/blob/07c30f1f169174fb56964c374af53232d1139a6d/scipy/linalg/_special_matrices.py#L376-L377
from anndata.
Huh, that's weird. Probably dealing with that case you linked to that leaks over.
Could probably open an issue for it on scipy
I think I would be okay with going with that resulting in a (0, 0) matrix here, so it's more like a numpy array.
from anndata.
Ok, so I'll open a scipy issue and comment out the failing test with a link to the issue. I agree with your sentiment.
from anndata.
Issue: scipy/scipy#19919
from anndata.
Given scipy/scipy#19919 I would be in favor of just matching the scipy sparse behavior for the sake of tests i.e., returning (1,0)
sized matrices for empty ones when indexing via [empty_mask, empty_mask]
from anndata.
Related Issues (20)
- `to_df` docstrings
- dask.array.store but with anndata schema HOT 1
- Indexing With a Dask Array HOT 5
- adata.raw = adata HOT 1
- GPU CI tests failing HOT 2
- Add working `GroupStorageType` type annotation
- 0.10.6 - Cannot write files due to implicit conversion to str dtype. HOT 2
- Saving .h5ad with pd.Series in .uns results in IORegistryError HOT 3
- `read_elem_as_dask` HOT 8
- `FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'` on CI HOT 2
- Upcoming Scipy 1.13 incompatible with file-backed sparse matrices
- CZI files' `var` count changd
- `/` in column names makes AnnData Zarr object unreadable on windows HOT 12
- String indexes in var lead to UserWarning HOT 1
- Move tests out of the package
- Refactor `BaseCompressedSparseDataset` and subclasses to remove `backed_{csr,csc}_matrix`
- concat_on_disk should use int64 indptrs by default so that it can concatenate large files HOT 4
- TypeError: Can't implicitly convert non-string objects to strings HOT 4
- Error concatenating scRNA with visium dataset
- Error: Expected a python object, received a character HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anndata.