From 13e59efa666a20b4dcbe3587cdf505cf2250bd2a Mon Sep 17 00:00:00 2001 From: Haoyu Zhang Date: Tue, 24 Sep 2024 11:17:12 -0600 Subject: [PATCH] [impl]: Fix calculation for the number of threads to be used --- libs/ccc/coef/impl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ccc/coef/impl.py b/libs/ccc/coef/impl.py index 29a1f654..f867f78f 100644 --- a/libs/ccc/coef/impl.py +++ b/libs/ccc/coef/impl.py @@ -640,7 +640,7 @@ def ccc( # get number of cores to use n_jobs = os.cpu_count() if n_jobs is None else n_jobs - default_n_threads = (os.cpu_count() - n_jobs) if n_jobs < 0 else n_jobs + default_n_threads = (os.cpu_count() + n_jobs) if n_jobs < 0 else n_jobs if internal_n_clusters is not None: _tmp_list = List()