diff --git a/1230e83b6793e5ccda8543f3584eb8bc2dc657e2.patch b/1230e83b6793e5ccda8543f3584eb8bc2dc657e2.patch new file mode 100644 index 0000000..de63d4b --- /dev/null +++ b/1230e83b6793e5ccda8543f3584eb8bc2dc657e2.patch @@ -0,0 +1,23 @@ +From 8b398bf086d426bd9071a4cde5186c5f86a5fc8e Mon Sep 17 00:00:00 2001 +From: Thomas A Caswell +Date: Sun, 28 Jul 2019 13:37:39 -0400 +Subject: [PATCH] Backport PR #14901: Fix GH14900: numpy 1.17.0 breaks + test_colors. + +--- + lib/matplotlib/colors.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/matplotlib/colors.py b/lib/matplotlib/colors.py +index 1e47c00c79b..585381d9a7a 100644 +--- a/lib/matplotlib/colors.py ++++ b/lib/matplotlib/colors.py +@@ -1685,7 +1685,7 @@ def shade_normals(self, normals, fraction=1.): + # visually appears better than a "hard" clip. + intensity -= imin + intensity /= (imax - imin) +- intensity = np.clip(intensity, 0, 1, intensity) ++ intensity = np.clip(intensity, 0, 1) + + return intensity + diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 178223d..fbcca05 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -59,6 +59,9 @@ Patch0001: 0001-Force-using-system-qhull.patch # Don't attempt to download jQuery and jQuery UI Patch0002: 0001-Use-packaged-jquery-and-jquery-ui.patch +# Fix tests with NumPy 1.17. +# https://github.com/matplotlib/matplotlib/pull/14901 +Patch0003: 1230e83b6793e5ccda8543f3584eb8bc2dc657e2.patch # Fedora-specific patches; see: # https://github.com/fedora-python/matplotlib/tree/fedora-patches @@ -258,6 +261,8 @@ Requires: python3-matplotlib%{?_isa} = %{version}-%{release} %patch0002 -p1 +%patch0003 -p1 + # Fedora-specific patches follow: %patch1001 -p1 # Updated test images for new FreeType.