Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 642477e

Browse files
committed
Use values outside [0, 1] for testing under/over.
1 parent feb1f87 commit 642477e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/tests/test_colors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,6 @@ def test_repr_html():
11721172

11731173
def test_get_under_over_bad():
11741174
cmap = plt.get_cmap('viridis')
1175-
assert_array_equal(cmap.get_under(), cmap(0.0))
1176-
assert_array_equal(cmap.get_over(), cmap(1.0))
1175+
assert_array_equal(cmap.get_under(), cmap(-np.inf))
1176+
assert_array_equal(cmap.get_over(), cmap(np.inf))
11771177
assert_array_equal(cmap.get_bad(), cmap(np.nan))

0 commit comments

Comments
 (0)