PHOTOX / promdens

Initial condition filtering with laser pulse.
0 stars 0 forks source link

DeprecationWarning: Change `trapz` for `trapezoid` integration function #9

Open danielhollas opened 2 weeks ago

danielhollas commented 2 weeks ago

Noticed this in the CI

/home/runner/work/promdens/promdens/promdens.py:380: DeprecationWarning: `trapz` is deprecated. Use `trapezoid` instead, or one of the numerical integration functions in `scipy.integrate`.

trapz function has been deprecated in numpy 2.0 version, but should be hopefully easy to replace with trapezoid. However, since the trapezoid function has only been added in v2.0, we probably want to stick to trapz for as while so we can support older numpy version. Also note that numpy 2.0 only supports Python >=3.9 so if we want to support older versions we cannot upgrade yet.

JanosJiri commented 2 weeks ago

Ok, good to know, thanks for pointing it out. I would stick to trapz for now since a lot of people probably still use older versions of python. We can upgrade in future.