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[DataFrame, number, str, ndarray, MaskedArray, csr_matrix, csc_matrix, Array, Dataset, Array, ZappyArray, CSRDataset, CSCDataset, DaskArray, CupyArray, CupySparseMatrix, 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