Skip to content

Commit f69a7de

Browse files
authored
Merge pull request #24266 from QuLogic/np123
TST: Increase fp tolerance on more tests for new NumPy
2 parents 3811658 + 6a5b7e5 commit f69a7de

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/matplotlib/tests/test_contour.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
import contourpy
66
import numpy as np
7-
from numpy.testing import assert_array_almost_equal
7+
from numpy.testing import (
8+
assert_array_almost_equal, assert_array_almost_equal_nulp)
89
import matplotlib as mpl
910
from matplotlib.testing.decorators import image_comparison
1011
from matplotlib import pyplot as plt, rc_context
@@ -313,7 +314,7 @@ def test_contourf_log_extension():
313314
cb = plt.colorbar(c1, ax=ax1)
314315
assert cb.ax.get_ylim() == (1e-8, 1e10)
315316
cb = plt.colorbar(c2, ax=ax2)
316-
assert cb.ax.get_ylim() == (1e-4, 1e6)
317+
assert_array_almost_equal_nulp(cb.ax.get_ylim(), np.array((1e-4, 1e6)))
317318
cb = plt.colorbar(c3, ax=ax3)
318319

319320

lib/matplotlib/tests/test_streamplot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def test_startpoints():
3434
plt.plot(start_x, start_y, 'ok')
3535

3636

37-
@image_comparison(['streamplot_colormap'], remove_text=True, style='mpl20')
37+
@image_comparison(['streamplot_colormap'], remove_text=True, style='mpl20',
38+
tol=0.022)
3839
def test_colormap():
3940
X, Y, U, V = velocity_field()
4041
plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy