Integrate along the given axis using the composite trapezoidal rule.
Integrate y (x) along given axis.
| Parameters: | y : array_like
x : array_like, optional
dx : scalar, optional
axis : int, optional
|
|---|
Examples
>>> np.trapz([1,2,3])
>>> 4.0
>>> np.trapz([1,2,3], [4,6,8])
>>> 8.0