Browse files

test_colors: use masked input in test

  • Loading branch information...
1 parent 421a765 commit 64e98e6c59ef9b1ab55f4ab1a724649dc54f1a8f @efiring committed Aug 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/matplotlib/tests/test_colors.py
View
2 lib/matplotlib/tests/test_colors.py
@@ -18,7 +18,7 @@ def test_colormap_endian():
# Test under, over, and invalid along with values 0 and 1.
a = [-0.5, 0, 0.5, 1, 1.5, np.nan]
for dt in ["f2", "f4", "f8"]:
- anative = np.array(a, dtype=dt)
+ anative = np.ma.masked_invalid(np.array(a, dtype=dt))
aforeign = anative.byteswap().newbyteorder()
#print(anative.dtype.isnative, aforeign.dtype.isnative)
assert_array_equal(cmap(anative), cmap(aforeign))

0 comments on commit 64e98e6

Please sign in to comment.