-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
MAINT: add trapezoid
as the new name for trapz
#25738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# into a new Python function which requires `__code__` and a few other | ||
# attributes. So we create a dummy clone and copy over its attributes allowing | ||
# SciPy <= 1.10 to work: https://github.com/scipy/scipy/issues/17811 | ||
assert not hasattr(trapz, "__code__") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a regular cleanup, not directly related to trapz
/trapezoid
. It's a workaround that is simply no longer needed; it's been fixed in SciPy for a while, and older releases don't support numpy 2.0
Rather than pointing users at ``scipy.interpolate.trapezoid``, we keep the functionality in NumPy after the discussion in numpygh-25586. `trapz` stays deprecated, and will be removed in the future. But this change makes the change for users who don't want to depend on SciPy a lot easier. Closes numpygh-25586 [skip cirrus]
aecf4a9
to
a63b5ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
LGTM, thanks Ralf. |
This PR adds back the links that were removed from `trapz` in PR numpy#24445, finishing the migration to `trapezoid` in PR numpy#25738. Currently, no web docs appear for `trapezoid`.
This PR adds back the links that were removed from `trapz` in PR numpy#24445, finishing the migration to `trapezoid` in PR numpy#25738. Currently, no web docs appear for `trapezoid`. [skip actions] [skip azp] [skip cirrus]
Rather than pointing users at
scipy.interpolate.trapezoid
, we keep the functionality in NumPy after the discussion in gh-25586.trapz
stays deprecated, and will be removed in the future. But this change makes the change for users who don't want to depend on SciPy a lot easier.Closes gh-25586