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

Unify X and layers #1707

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix write_anndata
flying-sheep committed Oct 25, 2024

Verified

This commit was signed with the committer’s verified signature.
joyeecheung Joyee Cheung
commit 95e8f1d78a4517a505fca94747abde96151b1e4c
7 changes: 6 additions & 1 deletion src/anndata/_io/specs/methods.py
Original file line number Diff line number Diff line change
@@ -280,7 +280,12 @@ def write_anndata(
_writer.write_elem(g, "varm", dict(adata.varm), dataset_kwargs=dataset_kwargs)
_writer.write_elem(g, "obsp", dict(adata.obsp), dataset_kwargs=dataset_kwargs)
_writer.write_elem(g, "varp", dict(adata.varp), dataset_kwargs=dataset_kwargs)
_writer.write_elem(g, "layers", dict(adata.layers), dataset_kwargs=dataset_kwargs)
_writer.write_elem(
g,
"layers",
{k: v for k, v in adata.layers.items() if k is not None},
dataset_kwargs=dataset_kwargs,
)
_writer.write_elem(g, "uns", dict(adata.uns), dataset_kwargs=dataset_kwargs)
_writer.write_elem(g, "raw", adata.raw, dataset_kwargs=dataset_kwargs)

Loading