29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
From 5d031f83fb390151739c32072951c7325821aadf Mon Sep 17 00:00:00 2001
|
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
Date: Mon, 22 Aug 2022 16:06:15 -0400
|
|
Subject: [PATCH 4/5] Loosen up test_Normalize test
|
|
|
|
Fixes #23707
|
|
|
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
---
|
|
lib/matplotlib/tests/test_colors.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/matplotlib/tests/test_colors.py b/lib/matplotlib/tests/test_colors.py
|
|
index 30f28fc67a..4a098ef068 100644
|
|
--- a/lib/matplotlib/tests/test_colors.py
|
|
+++ b/lib/matplotlib/tests/test_colors.py
|
|
@@ -567,7 +567,7 @@ def test_Normalize():
|
|
norm = plt.Normalize(1, 1 + 100 * eps)
|
|
# This returns exactly 0.5 when longdouble is extended precision (80-bit),
|
|
# but only a value close to it when it is quadruple precision (128-bit).
|
|
- np.testing.assert_array_almost_equal_nulp(norm(1 + 50 * eps), 0.5)
|
|
+ assert_array_almost_equal(norm(1 + 50 * eps), 0.5, decimal=3)
|
|
|
|
|
|
def test_FuncNorm():
|
|
--
|
|
2.36.1
|
|
|