Skip to content

Commit

Permalink
Use scipy.integrate.cumulative_trapezoid (#617)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrjbca committed Sep 8, 2024
1 parent 8a76527 commit e0483a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion skypy/galaxies/tests/test_stellar_mass.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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

Expand Down

0 comments on commit e0483a6

Please sign in to comment.