Skip to content

Commit

Permalink
Compatability for scipy 1.14 (#176)
Browse files Browse the repository at this point in the history
* update sipy simpson

* add req version for scipy

* actually update function usage

* macos-11 runner deprecated

* updated setup-miniconda version
  • Loading branch information
itrharrison authored Jul 5, 2024
1 parent ae60884 commit 53a2729
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ jobs:
python-version: '3.8'
toxenv: py38-test-oldest

- name: macOS 11
os: macos-11
- name: macOS latest
os: macos-latest
python-version: '3.11'
toxenv: py311-test-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Conda w/ Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: false
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies = [
"requests",
'importlib-metadata; python_version<"3.8"',
"numpy",
"scipy",
"scipy>=1.6",
"pandas", # to remove
"astropy",
"cobaya",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy
scipy
scipy>=1.6
pandas
scikit-learn
pyyaml
Expand Down
4 changes: 2 additions & 2 deletions soliket/clusters/tinker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

import numpy as np
from scipy.integrate import simps
from scipy.integrate import simpson
from scipy.interpolate import InterpolatedUnivariateSpline as iuSpline

# Tinker stuff
Expand Down Expand Up @@ -129,7 +129,7 @@ def sigma_sq_integral(R_grid, power_spt, k_val):
) * k ** 2 for k, i in zip(k_val, np.arange(len(k_val)))]
)

return simps(to_integ / (2 * np.pi ** 2), x=k_val, axis=0)
return simpson(to_integ / (2 * np.pi ** 2), x=k_val, axis=0)


def dn_dlogM(M, z, rho, delta, k, P, comoving=False):
Expand Down

0 comments on commit 53a2729

Please sign in to comment.