Skip to content

Commit

Permalink
test: trapezoid should be used for Numpy >= 2 and trapz otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed Feb 15, 2025
1 parent c9f7e91 commit 9b33203
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pint/testsuite/test_numpy_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def test_trapz(self):
np.trapezoid(t, x=z), self.Q_(1108.6, "kelvin meter")
)

@helpers.requires_numpy_at_least("2.0")
def test_trapz_no_autoconvert(self):
t = self.Q_(np.array([0.0, 4.0, 8.0]), "degC")
z = self.Q_(np.array([0.0, 2.0, 4.0]), "m")
Expand Down

0 comments on commit 9b33203

Please sign in to comment.