Backport fix for several failures in TestNumpyUnclassified

This commit is contained in:
Benjamin A. Beasley
2023-10-30 12:32:46 -04:00
parent e1d6b874f0
commit 44323f33dc
2 changed files with 33 additions and 0 deletions
@@ -0,0 +1,25 @@
From 9ace880dfa2a57772f1c2cac1316338995baf1fb Mon Sep 17 00:00:00 2001
From: Justus Magin <keewis@posteo.de>
Date: Tue, 7 Mar 2023 13:24:37 +0100
Subject: [PATCH] add `min` and `max` to the array function overrides
---
pint/numpy_func.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pint/numpy_func.py b/pint/numpy_func.py
index e09decb..ccc99b9 100644
--- a/pint/numpy_func.py
+++ b/pint/numpy_func.py
@@ -805,6 +805,8 @@ for func_str, unit_arguments, wrap_output in [
("broadcast_to", ["array"], True),
("amax", ["a", "initial"], True),
("amin", ["a", "initial"], True),
+ ("max", ["a", "initial"], True),
+ ("min", ["a", "initial"], True),
("searchsorted", ["a", "v"], False),
("isclose", ["a", "b"], False),
("nan_to_num", ["x", "nan", "posinf", "neginf"], True),
--
2.41.0
+8
View File
@@ -20,6 +20,14 @@ Source0: %{pypi_source Pint}
# https://github.com/hgrecco/pint/issues/1825
Patch: %{url}/commit/b3b18277ecc682bff7ca1fa9e48992f7ec68e47f.patch
# add min and max to the array function overrides
# https://github.com/hgrecco/pint/commit/1b2b0592f88a1c9fdf9b5649ebade19fa81adea4
#
# Fixes several failures in TestNumpyUnclassified
#
# Cherry-picked to 0.19.
Patch: 0001-add-min-and-max-to-the-array-function-overrides.patch
BuildArch: noarch
%global _description %{expand: