From 7ab02778289220759a3b940ee3d70df9ae59ced5 Mon Sep 17 00:00:00 2001 From: cosmin Date: Thu, 2 Nov 2023 09:40:19 +0200 Subject: [PATCH] fixed sklearn sanity checks for valid_metrics --- neurokit2/complexity/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neurokit2/complexity/utils.py b/neurokit2/complexity/utils.py index f3801bfb09..86ffb8741c 100644 --- a/neurokit2/complexity/utils.py +++ b/neurokit2/complexity/utils.py @@ -111,7 +111,7 @@ def _get_count( # ------------------- # Sanity checks sklearn_version = version.parse(sklearn.__version__) - if sklearn_version >= version.parse("1.3.0"): + if sklearn_version in [version.parse("1.3.0"), version.parse("1.3.0rc1")]: valid_metrics = sklearn.neighbors.KDTree.valid_metrics() + ["range"] else: valid_metrics = sklearn.neighbors.KDTree.valid_metrics + ["range"]