Skip to content

Update numpy trapz to trapezoid#11

Open
galenegan wants to merge 1 commit into
sofarocean:mainfrom
galenegan:trapz-update
Open

Update numpy trapz to trapezoid#11
galenegan wants to merge 1 commit into
sofarocean:mainfrom
galenegan:trapz-update

Conversation

@galenegan
Copy link
Copy Markdown

The numpy trapz function was deprecated in 2.0, and as of 2.4 it has been removed entirely. This PR updates all calls to the equivalent numpy.trapezoid.

@pieterbartsmit
Copy link
Copy Markdown
Contributor

pieterbartsmit commented May 20, 2026

Only saw this just now.

I used this pattern elsewhere myself to avoid issues with legacy numpy on some of our prod systems.

try:
from numpy import trapezoid
except ImportError:
from numpy import trapz as trapezoid

It is probably a non-issue and we could merge as is.

Did the tests pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants