MAINT: add trapezoid as the new name for trapz#25738
Merged
Merged
Conversation
rgommers
commented
Jan 31, 2024
| # 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__") |
Member
Author
There was a problem hiding this comment.
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
ntessore
reviewed
Jan 31, 2024
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
Member
|
LGTM, thanks Ralf. |
This was referenced Feb 4, 2024
Closed
Merged
bmwoodruff
added a commit
to bmwoodruff/numpy
that referenced
this pull request
Jun 8, 2024
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`.
bmwoodruff
added a commit
to bmwoodruff/numpy
that referenced
this pull request
Jun 8, 2024
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]
This was referenced Mar 20, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rather than pointing users at
scipy.interpolate.trapezoid, we keep the functionality in NumPy after the discussion in gh-25586.trapzstays 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