Change trapz and cumtrapz to trapezoid and cumulative_trapezoid for Python >=3.11
The trapz
and cumtrapz
functions for the integration are changed to trapezoid
and cumulative_trapezoid
functions, which should do the same in newer versions of scipy as described in the official documentation.
trapz: https://docs.scipy.org/doc/scipy-0.10.1/reference/generated/scipy.integrate.trapz.html trapezoid: https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.trapezoid.html
similarly for the cumulative functions.
Edited by Petr Mácha