anndata.experimental.write_elem

Contents

anndata.experimental.write_elem#

anndata.experimental.write_elem(store, k, elem, *, dataset_kwargs=mappingproxy({}))[source]#

Write an element to a storage group using anndata encoding.

Parameters:
store Union[Group, Group]

The group to write to.

k str

The key to write to in the group. Note that absolute paths will be written from the root.

elem Union[ndarray[Any, dtype[TypeVar(_ScalarType_co, bound= generic, covariant=True)]], MaskedArray, spmatrix, Dataset, Array, ZappyArray, BaseCompressedSparseDataset, DaskArray, CupyArray, CupySparseMatrix, Array, DataFrame, number, str, dict[str, RWAble], list[RWAble], AnnData, Categorical, ExtensionArray]

The element to write. Typically an in-memory object, e.g. an AnnData, pandas dataframe, scipy sparse matrix, etc.

dataset_kwargs Mapping[str, Any] (default: mappingproxy({}))

Keyword arguments to pass to the stores dataset creation function. E.g. for zarr this would be chunks, compressor.

Return type:

None