diff --git a/0001-add-min-and-max-to-the-array-function-overrides.patch b/0001-add-min-and-max-to-the-array-function-overrides.patch new file mode 100644 index 0000000..90d4b19 --- /dev/null +++ b/0001-add-min-and-max-to-the-array-function-overrides.patch @@ -0,0 +1,25 @@ +From 9ace880dfa2a57772f1c2cac1316338995baf1fb Mon Sep 17 00:00:00 2001 +From: Justus Magin +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 + diff --git a/python-pint.spec b/python-pint.spec index a9fc7ec..f4d8ce5 100644 --- a/python-pint.spec +++ b/python-pint.spec @@ -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: