anndata.experimental.write_dispatched

anndata.experimental.write_dispatched#

anndata.experimental.write_dispatched(store, key, elem, callback, *, dataset_kwargs=mappingproxy({}))[source]#

Write elem to store, recursively calling callback at each sub-element.

Parameters:
store Union[Group, Group]

Storage container to be written to.

key str

Key to write element to. To write to the root group, use “/”.

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. Probably an AnnData.

callback WriteCallback

Function called when writing each element.

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

Keyword arguments to pass to the dataset creation function.

Return type:

None