We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf4d08d + 3f45056 commit 8cdca3cCopy full SHA for 8cdca3c
1 file changed
src/squidpy/gr/_utils.py
@@ -4,9 +4,9 @@
4
5
from collections.abc import Hashable, Iterable, Sequence
6
from contextlib import contextmanager
7
+from importlib.metadata import version
8
from typing import TYPE_CHECKING, Any
9
-import anndata
10
import numpy as np
11
import pandas as pd
12
from anndata import AnnData
@@ -20,7 +20,7 @@
20
from squidpy._docs import d
21
from squidpy._utils import NDArrayA, _unique_order_preserving
22
23
-CAN_USE_SPARSE_ARRAY = Version(anndata.__version__) >= Version("0.11.0rc1")
+CAN_USE_SPARSE_ARRAY = Version(version("anndata")) >= Version("0.11.0rc1")
24
if CAN_USE_SPARSE_ARRAY:
25
from anndata._core.views import ArrayView
26
from anndata._core.views import SparseCSCMatrixView as SparseCSCView
0 commit comments