8000 TST: Increase some floating point datatypes and tolerances · matplotlib/matplotlib@d302dbe · GitHub
[go: up one dir, main page]

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 d302dbe

Browse files
committed
TST: Increase some floating point datatypes and tolerances
This is for floating point errors that crept in with AVX512 instruction sets on some CI architectures.
1 parent 357901a commit d302dbe

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3327,7 +3327,7 @@ def test_tick_space_size_0():
33273327

33283328
@image_comparison(['errorbar_basic', 'errorbar_mixed', 'errorbar_basic'])
33293329
def test_errorbar():
3330-
x = np.arange(0.1, 4, 0.5)
3330+
x = np.arange(0.1, 4, 0.5, dtype=np.longdouble)
33313331
y = np.exp(-x)
33323332

33333333
yerr = 0.1 + 0.2*np.sqrt(x)

lib/matplotlib/tests/test_streamplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def test_maxlength():
7878

7979

8080
@image_comparison(['streamplot_direction.png'],
81-
remove_text=True, style='mpl20', tol=0.056)
81+
remove_text=True, style='mpl20', tol=0.073)
8282
def test_direction():
8383
x, y, U, V = swirl_velocity_field()
8484
plt.streamplot(x, y, U, V, integration_direction='backward',

lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_polar_box():
140140
ax1.grid(True)
141141

142142

143-
@image_comparison(['axis_direction.png'], style='default', tol=0.07)
143+
@image_comparison(['axis_direction.png'], style='default', tol=0.071)
144144
def test_axis_direction():
145145
# Remove this line when this test image is regenerated.
146146
plt.rcParams['text.kerning_factor'] = 6

lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ def test_text3d_modification(fig_ref, fig_test):
547547
ax_ref.text(x, y, z, f'({x}, {y}, {z}), dir={zdir}', zdir=zdir)
548548

549549

550-
@mpl3d_image_comparison(['trisurf3d.png'], tol=0.03)
550+
@mpl3d_image_comparison(['trisurf3d.png'], tol=0.061)
551551
def test_trisurf3d():
552552
n_angles = 36
553553
n_radii = 8
@@ -1369,7 +1369,7 @@ def test_errorbar3d():
13691369

13701370

13711371
@image_comparison(['stem3d.png'], style='mpl20',
1372-
tol=0.0 if platform.machine() == 'x86_64' else 0.003)
1372+
tol=0.003)
13731373
def test_stem3d():
13741374
fig, axs = plt.subplots(2, 3, figsize=(8, 6),
13751375
constrained_layout=True,

0 commit comments

Comments
 (0)
0