Skip to content

Commit 57e9dda

Browse files
committed
Fixed SciPy compatibility issue in the anderson_gof module.
1 parent 31bb0d3 commit 57e9dda

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bbp/comps/anderson_gof.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
cumulative_trapezoid = integrate.cumulative_trapezoid
5757
except AttributeError:
5858
cumulative_trapezoid = integrate.cumtrapz
59+
try:
60+
simpson = integrate.simpson
61+
except AttributeError:
62+
simpson = integrate.simps
5963

6064
# Import BBP modules
6165
import bband_utils
@@ -141,11 +145,11 @@ def eval_func2(p1, p2):
141145

142146
@staticmethod
143147
def integral(x, idt):
144-
return integrate.simps(x, x=None, dx=idt)
148+
return simpson(x, x=None, dx=idt)
145149

146150
@staticmethod
147151
def integral2(x, idt):
148-
return integrate.simps(x * x, x=None, dx=idt)
152+
return simpson(x * x, x=None, dx=idt)
149153

150154
@staticmethod
151155
def integ(array_in, idt):

0 commit comments

Comments
 (0)