anndata.experimental.WriteCallback#
- protocol anndata.experimental.WriteCallback[source]#
-
Classes that implement this protocol must have the following methods / attributes:
- __call__(write_func, store, elem_name, elem, *, iospec, dataset_kwargs)[source]#
Callback used in
anndata.experimental.write_dispatched()to customize writing an element to a store.- Parameters:
- write_func
Write[TypeVar(RWAble, bound=DataFrame|number|str|ndarray|MaskedArray|csr_matrix|csc_matrix|csr_array|csc_array|Dataset|Array|ZappyArray|CSRDataset|CSCDataset|Array|ndarray|spmatrix|Array|DataArray|dict[str, AxisStorable] |list[AxisStorable] |AnnData|Categorical|ExtensionArray)] anndata.io.write_elem()function to call to read the current element given theiospec.- store
Array|Dataset|Group|Group The store to which
elemshould be written.- elem_name
str The key to read in from the group.
- elem
TypeVar(RWAble, bound=DataFrame|number|str|ndarray|MaskedArray|csr_matrix|csc_matrix|csr_array|csc_array|Dataset|Array|ZappyArray|CSRDataset|CSCDataset|Array|ndarray|spmatrix|Array|DataArray|dict[str, AxisStorable] |list[AxisStorable] |AnnData|Categorical|ExtensionArray) The element to write out.
- iospec
IOSpec Internal AnnData encoding specification for the element.
- dataset_kwargs
Mapping[str,Any] Keyword arguments to be passed to a library-level io function, like
chunksfor Zarr-Python.
- write_func
- Return type: