anndata.acc.AdRef#
- class anndata.acc.AdRef(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