File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from collections .abc import Mapping
2+ from typing import TYPE_CHECKING
3+
4+ if TYPE_CHECKING :
5+ from anndata import AnnData
6+
7+ try :
8+ from anndata ._core .aligned_mapping import AlignedView , AxisArrays , PairwiseArrays
9+ except ImportError :
10+ # anndata < 0.10.9
11+ from anndata ._core .aligned_mapping import (
12+ AlignedActualMixin ,
13+ AxisArraysBase ,
14+ PairwiseArraysBase ,
15+ )
16+ from anndata ._core .aligned_mapping import (
17+ AlignedViewMixin as AlignedView ,
18+ )
19+
20+ class AxisArrays (AlignedActualMixin , AxisArraysBase ):
21+ def __init__ (
22+ self ,
23+ parent : "AnnData" ,
24+ axis : int ,
25+ store : Mapping | AxisArraysBase | None = None ,
26+ ):
27+ self ._parent = parent
28+ if axis not in {0 , 1 }:
29+ raise ValueError ()
30+ self ._axis = axis
31+ self ._data = dict ()
32+ if store is not None :
33+ self .update (store )
34+
35+ class PairwiseArrays (AlignedActualMixin , PairwiseArraysBase ):
36+ def __init__ (
37+ self ,
38+ parent : "AnnData" ,
39+ axis : int ,
40+ store : Mapping | None = None ,
41+ ):
42+ self ._parent = parent
43+ if axis not in {0 , 1 }:
44+ raise ValueError ()
45+ self ._axis = axis
46+ self ._data = dict ()
47+ if store is not None :
48+ self .update (store )
49+
50+
51+ __all__ = ["AlignedView" , "AxisArrays" , "PairwiseArrays" ]
You can’t perform that action at this time.
0 commit comments