File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 9494 ZarrArray .__module__ = ZarrGroup .__module__ = "zarr"
9595
9696
97- if TYPE_CHECKING or find_spec ( "anndata" ) :
97+ if TYPE_CHECKING :
9898 from anndata .abc import CSCDataset , CSRDataset # type: ignore[import-untyped]
9999else : # pragma: no cover
100- CSRDataset = type ("CSRDataset" , (), {})
101- CSCDataset = type ("CSCDataset" , (), {})
102- CSRDataset .__module__ = CSCDataset .__module__ = "anndata.abc"
100+ try : # only exists in anndata 0.11+
101+ from anndata .abc import CSCDataset , CSRDataset # type: ignore[import-untyped]
102+ except ImportError :
103+ CSRDataset = type ("CSRDataset" , (), {})
104+ CSCDataset = type ("CSCDataset" , (), {})
105+ CSRDataset .__module__ = CSCDataset .__module__ = "anndata.abc"
103106CSDataset = CSRDataset | CSCDataset
104107"""Anndata sparse out-of-core matrices."""
You can’t perform that action at this time.
0 commit comments