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