Integrate along the given axis using the composite trapezoidal rule.
float|int
NumPhp::trapz(
array|NdArray
$m
)
$m
A float|int
use SciPhp\NumPhp as np;
$m = np::arange(0, 5);
$r = np::trapz($m);
echo "m\n$m", "r\n$r";
The above example will output:
m [0 1 2 3 4] r 8