Skip to content

Commit

Permalink
switch to scipy.integrate.simpson
Browse files Browse the repository at this point in the history
scipy.integrate.simps was deprecated in scipy 1.12.0 and will be removed in 1.14
https://docs.scipy.org/doc/scipy/release/1.12.0-notes.html#deprecated-features

This does introduce a requirement of scipy>=1.6.0, which is when scipy.integrate.simpson was introduced
https://docs.scipy.org/doc/scipy/release/1.6.0-notes.html#scipy-integrate-improvements
  • Loading branch information
aidanmontare-fed committed May 3, 2024
1 parent 8faefa9 commit f17eff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions allantools/allantools.py
Original file line number Diff line number Diff line change
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

0 comments on commit f17eff7

Please sign in to comment.