diff --git a/src/cellcharter/_utils.py b/src/cellcharter/_utils.py index 0a7654b..e5dcb2b 100644 --- a/src/cellcharter/_utils.py +++ b/src/cellcharter/_utils.py @@ -2,6 +2,10 @@ from typing import Union +import numpy as np + +AnyRandom = Union[int, np.random.RandomState, None] + def str2list(value: Union[str, list]) -> list: """Check whether value is a string. If so, converts into a list containing value.""" diff --git a/src/cellcharter/tl/_gmm.py b/src/cellcharter/tl/_gmm.py index 783c0c0..93c5a8e 100644 --- a/src/cellcharter/tl/_gmm.py +++ b/src/cellcharter/tl/_gmm.py @@ -14,9 +14,10 @@ from pycave.bayes.gmm.lightning_module import GaussianMixtureLightningModule from pycave.bayes.gmm.model import GaussianMixtureModel from pytorch_lightning import Trainer -from scanpy._utils import AnyRandom from sklearn.cluster import KMeans, MiniBatchKMeans +from .._utils import AnyRandom + logger = logging.getLogger(__name__)