Skip to content

Commit d3bf464

Browse files
committed
TST: account for flakiness with Numpy v1 (part 2)
1 parent 809ad23 commit d3bf464

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/tests/test_colorbar.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,9 @@ def test_colorbar_format(fmt):
631631
assert cbar.ax.yaxis.get_ticklabels()[4].get_text() == '2.00e+02'
632632

633633
# but if we change the norm:
634-
im.set_norm(LogNorm(vmin=0.1, vmax=10))
634+
# when we require numpy >= 2, vmin can be 0.1, but at numpy 1.x this is
635+
# sensitive to floating point errors
636+
im.set_norm(LogNorm(vmin=0.09999, vmax=10))
635637
fig.canvas.draw()
636638
assert (cbar.ax.yaxis.get_ticklabels()[0].get_text() ==
637639
'$\\mathdefault{10^{-2}}$')

0 commit comments

Comments
 (0)