Skip to content

Commit

Permalink
Update required Scipy version (#617)
Browse files Browse the repository at this point in the history
* Rename simps and update README

* Update simpson keyword arg

* Prepare for ccl new minor versions

* Update build_check.yml

* Update version to 1.12.2

---------

Co-authored-by: m-aguena <[email protected]>
  • Loading branch information
hsinfan1996 and m-aguena committed Jun 28, 2024
1 parent 714b92d commit d1bf0a1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ link to this repository: https://github.com/LSSTDESC/CLMM. Please follow the gui
CLMM requires Python version 3.8 or later. CLMM has the following dependencies:

- [NumPy](https://www.numpy.org/) (v1.17 or later)
- [SciPy](https://scipy.org/) (v1.3 or later)
- [SciPy](https://scipy.org/) (v1.6 or later)
- [Astropy](https://www.astropy.org/) (v4.0 or later for units and cosmology dependence)
(Please avoid Astropy v5.0 since there is bug breaking CCL backend. It has been fixed in Astropy v5.0.1.)
- [Matplotlib](https://matplotlib.org/) (for plotting and going through tutorials)
Expand Down
2 changes: 1 addition & 1 deletion clmm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
)
from . import support

__version__ = "1.12.1"
__version__ = "1.12.2"
4 changes: 2 additions & 2 deletions clmm/redshift/tools.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""General utility functions that are used in multiple modules"""
import warnings
import numpy as np
from scipy.integrate import simps
from scipy.integrate import simpson
from scipy.interpolate import interp1d


Expand Down Expand Up @@ -55,7 +55,7 @@ def _integ_pzfuncs(pzpdf, pzbins, zmin=0.0, zmax=5, kernel=lambda z: 1.0, ngrid=
pz_matrix = np.array(pzpdf)[:, mask]
kernel_matrix = kernel(z_grid)

return simps(pz_matrix * kernel_matrix, x=z_grid, axis=1)
return simpson(pz_matrix * kernel_matrix, x=z_grid, axis=1)


def compute_for_good_redshifts(
Expand Down
4 changes: 2 additions & 2 deletions clmm/theory/parent_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np

# functions for the 2h term
from scipy.integrate import simps, quad
from scipy.integrate import simpson, quad
from scipy.special import jv
from scipy.interpolate import splrep, splev

Expand Down Expand Up @@ -232,7 +232,7 @@ def __integrand__(l_value, theta):
return l_value * jv(sph_harm_ord, l_value * theta) * splev(k_value, interp_pk)

l_values = np.logspace(loglbounds[0], loglbounds[1], lsteps)
kernel = np.array([simps(__integrand__(l_values, t), l_values) for t in theta])
kernel = np.array([simpson(__integrand__(l_values, t), x=l_values) for t in theta])
return halobias * kernel * rho_m / (2 * np.pi * (1 + z_cl) ** 3 * da**2)

def _eval_surface_density_2h(
Expand Down

0 comments on commit d1bf0a1

Please sign in to comment.