This is documentation for an old release of SciPy (version 0.7.). Read this page in the documentation of the latest stable release (version 1.15.1).
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