Skip to content

Commit

Permalink
Merge pull request #159 from aidanmontare-fed/fix-deprecated-simpson
Browse files Browse the repository at this point in the history
Fix usage of deprecated scipy.integrate function
  • Loading branch information
aewallin committed May 4, 2024
2 parents 291c412 + bb55557 commit 3787eb5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions allantools/allantools.py
Expand Up @@ -111,7 +111,7 @@
import json
import numpy as np
from scipy import interpolate # used in psd2allan()
from scipy.integrate import simps # used in psd2allan()
from scipy.integrate import simpson # used in psd2allan()

from . import ci # edf, confidence intervals

Expand Down Expand Up @@ -1756,7 +1756,7 @@ def psd2allan(S_y, f=1.0, kind='adev', base=2):
for idx, mj in enumerate(m)])
integrand = np.insert(integrand, 0, 0.0, axis=1)
f = np.insert(f, 0, 0.0)
ad = np.sqrt(2.0 * simps(integrand, f))
ad = np.sqrt(2.0 * simpson(integrand, f))
return taus_used, ad


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -7,7 +7,7 @@ name = "AllanTools"
version = "2024.04"
dependencies = [
"numpy",
"scipy",
"scipy>=1.6.0",
"numpydoc",
"matplotlib",
"pytest",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,5 +1,5 @@
numpy
scipy
scipy>=1.6.0
numpydoc
matplotlib
pytest
Expand Down

0 comments on commit 3787eb5

Please sign in to comment.