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

Skip to content

Commit 64e98e6

Browse files
committed
test_colors: use masked input in test
1 parent 421a765 commit 64e98e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/tests/test_colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_colormap_endian():
1818
# Test under, over, and invalid along with values 0 and 1.
1919
a = [-0.5, 0, 0.5, 1, 1.5, np.nan]
2020
for dt in ["f2", "f4", "f8"]:
21-
anative = np.array(a, dtype=dt)
21+
anative = np.ma.masked_invalid(np.array(a, dtype=dt))
2222
aforeign = anative.byteswap().newbyteorder()
2323
#print(anative.dtype.isnative, aforeign.dtype.isnative)
2424
assert_array_equal(cmap(anative), cmap(aforeign))

0 commit comments

Comments
 (0)