From b427e5e15b34e3444192b5f44c4a69dbd1bcf584 Mon Sep 17 00:00:00 2001 From: Ian Harrison Date: Mon, 9 Sep 2024 11:04:06 +0100 Subject: [PATCH] scipy dep names fixes --- skypy/halos/mass.py | 2 +- skypy/halos/tests/test_quenching.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/skypy/halos/mass.py b/skypy/halos/mass.py index fa6329534..5f5f97918 100644 --- a/skypy/halos/mass.py +++ b/skypy/halos/mass.py @@ -325,7 +325,7 @@ def _sigma_squared(M, k, Pk, growth_function, cosmology): top_hat = 3. * (np.sin(k * R) - k * R * np.cos(k * R)) / ((k * R)**3.) integrand = Pk * np.power(top_hat * k, 2) - return Dz2 * integrate.simps(integrand, k) / (2. * np.pi**2.) + return Dz2 * integrate.simpson(integrand, k) / (2. * np.pi**2.) def _dlns_dlnM(sigma, M): diff --git a/skypy/halos/tests/test_quenching.py b/skypy/halos/tests/test_quenching.py index efa0c674d..d836441c3 100644 --- a/skypy/halos/tests/test_quenching.py +++ b/skypy/halos/tests/test_quenching.py @@ -13,7 +13,7 @@ def test_environment_quenched(): quenched = environment_quenched(n, p) number_quenched = Counter(quenched)[True] - p_value = stats.binom_test(number_quenched, n=n, p=p, + p_value = stats.binomtest(number_quenched, n=n, p=p, alternative='two-sided') assert p_value > 0.01 @@ -28,6 +28,6 @@ def test_mass_quenched(): quenched = mass_quenched(halo_mass, offset, width) number_quenched = Counter(quenched)[True] - p_value = stats.binom_test(number_quenched, n=n, p=0.5, + p_value = stats.binomtest(number_quenched, n=n, p=0.5, alternative='two-sided') assert p_value > 0.01