Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arrays with 3 dimensions or more #15

Open
rcannood opened this issue Jan 16, 2025 · 2 comments · Fixed by #16
Open

Add arrays with 3 dimensions or more #15

rcannood opened this issue Jan 16, 2025 · 2 comments · Fixed by #16
Labels
enhancement New feature or request

Comments

@rcannood
Copy link
Member

Description of feature

Could you add arrays to obsm and varm with which have at least 3 dimensions? Example:

import anndata as ad
import numpy as np

adata = ad.AnnData(
  shape=(1000, 100),
  obsm = {
    "spatial": np.random.rand(1000, 10, 3)
  }
)

adata.write_h5ad("spatial.h5ad")

This is needed to reproduce scverse/anndataR#204.

@rcannood rcannood added the enhancement New feature or request label Jan 16, 2025
@rcannood
Copy link
Member Author

I don't think there is really a need to go beyond 3 dimensions, though in the spirit of the package you could try a (10, 9, 8, 7, 6, 5)-dimensional sparse matrix :p

I'd be inclined to at least add integer matrices as well; boolean and string are nice to haves.

@rcannood rcannood reopened this Jan 23, 2025
@rcannood
Copy link
Member Author

See previous comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant