anndata.acc.RefAcc#

class anndata.acc.RefAcc(*, ref_class)[source]#

Bases: ABC

Abstract base class for reference accessors.

See here for all existing subclasses.

Attributes

ref_class: type[AdRef[Hashable]][source]#

Methods

abstractmethod __repr__()[source]#

Get a string representation of the accessor.

Return type:

str

abstractmethod dims(idx, /)[source]#

Get along which dimensions the referenced array is.

Return type:

Collection[Literal['obs', 'var']]

abstractmethod get(adata, idx, /)[source]#

Get the referenced array from the AnnData object.

Return type:

ndarray | MaskedArray | csr_matrix | csc_matrix | csr_array | csc_array | Array | ndarray | spmatrix

abstractmethod idx_repr(idx, /)[source]#

Get a string representation of the index.

Return type:

str

abstractmethod isin(adata, idx=None, /)[source]#

Check if the referenced array is in the AnnData object.

Return type:

bool

process_idx(idx, /)[source]#
Return type:

Hashable