Skip to content

Commit 53c9068

Browse files
committed
update trapz to trapezoid
1 parent 8a32eef commit 53c9068

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pecos/metrics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def time_integral(data, tfilter=None):
9494
where
9595
:math:`f` is a column of data
9696
:math:`dt` is the time step between observations.
97-
The integral is computed using the trapezoidal rule from numpy.trapz.
97+
The integral is computed using the trapezoidal rule from numpy.trapezoid.
9898
Results are given in [original data units]*seconds.
9999
NaN values are set to 0 for integration.
100100
@@ -124,7 +124,7 @@ def time_integral(data, tfilter=None):
124124

125125
F = {}
126126
for col in data.columns:
127-
F[col] = float(np.trapz(data.loc[:,col], tdelta))
127+
F[col] = float(np.trapezoid(data.loc[:,col], tdelta))
128128

129129
F = pd.Series(F)
130130

0 commit comments

Comments
 (0)