Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dc855ed

Browse filesBrowse files
authored
Merge pull request #7167 from anntzer/fix-normalize-test-on-quadruple-precision
TST: Less stringent normalization test for float128.
2 parents 53d685e + a6a08ad commit dc855ed
Copy full SHA for dc855ed

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed

‎lib/matplotlib/tests/test_colors.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_colors.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ def test_Normalize():
208208
# and for scalar ones.
209209
eps = np.finfo(np.longdouble).resolution
210210
norm = plt.Normalize(1, 1 + 100 * eps)
211-
assert_equal(norm(1 + 50 * eps), .5)
211+
# This returns exactly 0.5 when longdouble is extended precision (80-bit),
212+
# but only a value close to it when it is quadruple precision (128-bit).
213+
assert 0 < norm(1 + 50 * eps) < 1
212214

213215

214216
def test_SymLogNorm():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.