From f0f37829c34e3fd5bedcbb369a5d101fb755f1e3 Mon Sep 17 00:00:00 2001 From: Intron7 Date: Fri, 6 Dec 2024 13:31:34 +0100 Subject: [PATCH] move helper --- src/rapids_singlecell/preprocessing/_neighbors.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/rapids_singlecell/preprocessing/_neighbors.py b/src/rapids_singlecell/preprocessing/_neighbors.py index cd6eefb9..33f6c5d6 100644 --- a/src/rapids_singlecell/preprocessing/_neighbors.py +++ b/src/rapids_singlecell/preprocessing/_neighbors.py @@ -15,11 +15,6 @@ from rapids_singlecell.tools._utils import _choose_representation - -def _cuvs_switch(): - return parse_version(pylibraft.__version__) > parse_version("24.10") - - if TYPE_CHECKING: from collections.abc import Mapping @@ -66,6 +61,10 @@ def _cuvs_switch(): _Metrics = _MetricsDense | _MetricsSparse +def _cuvs_switch(): + return parse_version(pylibraft.__version__) > parse_version("24.10") + + def _brute_knn( X: cp_sparse.spmatrix | cp.ndarray, Y: cp_sparse.spmatrix | cp.ndarray,