From c74bdad70645d549dc1a5a21b0826455d0fa4e9b Mon Sep 17 00:00:00 2001 From: Jan Gleixner Date: Fri, 22 Mar 2024 11:08:58 +0100 Subject: [PATCH] adopt to scipy v1.12 * scipy.stats.binom_test was removed from scipy v1.12 see https://docs.scipy.org/doc/scipy-1.11.4/reference/generated/scipy.stats.binom_test.html * specify minimal version for development (testing) of scipy as 1.7 --- pyproject.toml | 2 +- tests/test_ICP.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3e874c0..f73e44e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ urls = {source = 'https://github.com/jan-glx/ICPy'} dependencies = ['numpy', 'scipy', 'scikit-learn',] [project.optional-dependencies] -test = ['pytest', 'pytest-cov', 'coverage',] +test = ['pytest', 'pytest-cov', 'coverage', 'scipy>=1.7.0'] doc = ['sphinx', 'furo', 'myst_parser'] diff --git a/tests/test_ICP.py b/tests/test_ICP.py index e13021e..4bb62ed 100644 --- a/tests/test_ICP.py +++ b/tests/test_ICP.py @@ -64,7 +64,7 @@ def one(): N = 100 K = sum((one() for _ in range(N))) - p_value = scipy.stats.binom_test(K, N, alpha, alternative="greater") + p_value = scipy.stats.binomtest(K, N, alpha, alternative="greater").pvalue self.assertGreater(p_value, 0.01) def test_parent_set_generator(self):