anndata.experimental.ReadCallback#
- protocol anndata.experimental.ReadCallback[source]#
-
Classes that implement this protocol must have the following methods / attributes:
- __call__(read_func, elem_name, elem, *, iospec)[source]#
Callback used in
anndata.experimental.read_dispatched()
to customize reading an element from a store.- Parameters:
- read_func
Read
[TypeVar
(S_co
, bound=Array
|Dataset
|Group
|Group
, covariant=True),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
|dict
[str
, AxisStorable] |list
[AxisStorable] |AnnData
|Categorical
|ExtensionArray
)] anndata.io.read_elem()
function to call to read the current element given theiospec
.- elem_name
str
The key to read in from the group.
- elem
Array
|Dataset
|Group
|Group
The element to read from.
- iospec
IOSpec
Internal AnnData encoding specification for the element.
- read_func
- Return type:
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
|dict
[str
, AxisStorable] |list
[AxisStorable] |AnnData
|Categorical
|ExtensionArray
)- Returns:
The element read from the store.