anndata.acc.RefAcc#
- class anndata.acc.RefAcc(*, ref_class)[source]#
Bases:
ABCAbstract base class for reference accessors.
See reference accessors for all existing subclasses.
Attributes
Methods
- abstractmethod dims(idx, /)[source]#
Get along which dimensions the referenced array is.
- Return type:
Collection[Literal['obs','var']]
- abstractmethod get(data, idx=NO_IDX, /)[source]#
- Overloads:
self, data (D) → FullArray
self, data (D), idx (I) → Array
Get the indexed array from the AnnData object at
idx.When
idxis omitted (i.e.,idxisNO_IDX), return the full array one level up instead. This has the same semantics as theAdRefpath but one level up:adata[A.obs]returns the fullDataFrameandadata[A.obsm["pca"]]the fullnumpy.ndarray. These both have definedshape-like properties (orawkward.Array), unlike, for example,obsmor similar.