-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
TST: Add future dependency tests as a weekly CI job #21634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -568,14 +568,15 @@ def test_Normalize(): | |
# Don't lose precision on longdoubles (float128 on Linux): | ||
# for array inputs... | ||
vals = np.array([1.2345678901, 9.8765432109], dtype=np.longdouble) | ||
norm = mcolors.Normalize(vals.min(), vals.max()) | ||
assert_array_equal(np.asarray(norm(vals)), [0, 1]) | ||
norm = mcolors.Normalize(vals[0], vals[1]) | ||
assert norm(vals).dtype == np.longdouble | ||
assert_array_equal(norm(vals), [0, 1]) | ||
# and for scalar ones. | ||
eps = np.finfo(np.longdouble).resolution | ||
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). | ||
assert 0 < norm(1 + 50 * eps) < 1 | ||
np.testing.assert_array_almost_equal_nulp(norm(1 + 50 * eps), 0.5) | ||
Comment on lines
577
to
+579
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to be a bit too strict now, as it is failing on aarch64, ppc64le, and s390x, where the result is 0.50096339. Also, on my 64-bit AMD system, which is apparently using |
||
|
||
|
||
def test_FuncNorm(): | ||
|
Uh oh!
There was an error while loading. Please reload this page.