anndata.acc.AdRef#
- class anndata.acc.AdRef[I: Hashable, D: MuData | AnnData](acc, idx)[source]#
Bases:
A reference to a 1D or 2D array along one or two dimensions of an AnnData object.
Examples
Use
Ain the same way you would anAnnDataobject if you wanted to access a 1D or 2D array along the whole dimension. You can then introspect the reference:>>> from anndata.acc import A >>> ref = A.obs["x"] >>> type(ref) <class 'anndata.acc.AdRef'> >>> ref.dims {'obs'} >>> ref.idx 'x' >>> ref.acc A.obs
See
anndata.accandAdAccfor more examples.Attributes
- dims#
Which dimensions are spanned by the array?
- acc: RefAcc[Self, I, D]#
The accessor containing information about this array.
See reference accessors for all possible types this can assume.