diff --git a/skypy/galaxies/tests/test_stellar_mass.py b/skypy/galaxies/tests/test_stellar_mass.py index b8809235..cc03ef10 100644 --- a/skypy/galaxies/tests/test_stellar_mass.py +++ b/skypy/galaxies/tests/test_stellar_mass.py @@ -68,7 +68,7 @@ def calc_cdf(m): mass_min = 10 ** 7 mass_max = 10 ** 13 pdf = calc_pdf(m, alpha, mass_star, mass_min, mass_max) - cdf = scipy.integrate.cumtrapz(pdf, m, initial=0) + cdf = scipy.integrate.cumulative_trapezoid(pdf, m, initial=0) cdf = cdf / cdf[-1] return cdf diff --git a/skypy/galaxies/tests/test_velocity_dispersion.py b/skypy/galaxies/tests/test_velocity_dispersion.py index b5be57ec..a01429de 100644 --- a/skypy/galaxies/tests/test_velocity_dispersion.py +++ b/skypy/galaxies/tests/test_velocity_dispersion.py @@ -1,7 +1,7 @@ import numpy as np from scipy.stats import kstest from scipy.special import gamma -from scipy.integrate import cumtrapz +from scipy.integrate import cumulative_trapezoid def test_schechter_vdf(): @@ -30,7 +30,7 @@ def calc_pdf(vd): def calc_cdf(m): pdf = calc_pdf(m) - cdf = cumtrapz(pdf, m, initial=0) + cdf = cumulative_trapezoid(pdf, m, initial=0) cdf /= cdf[-1] return cdf