Beispiel #1
0
 def test_bytescale_mask(self):
     a = np.ma.MaskedArray(data=[1, 2, 3], mask=[False, False, True])
     actual = misc.bytescale(a)
     expected = [0, 255, 3]
     assert_equal(expected, actual)
     assert_mask_equal(a.mask, actual.mask)
     assert_(isinstance(actual, np.ma.MaskedArray))
Beispiel #2
0
 def test_bytescale_mask(self):
     a = np.ma.MaskedArray(data=[1, 2, 3], mask=[False, False, True])
     actual = misc.bytescale(a)
     expected = [0, 255, 3]
     assert_equal(expected, actual)
     assert_mask_equal(a.mask, actual.mask)
     self.assertTrue(isinstance(actual, np.ma.MaskedArray))
Beispiel #3
0
 def test_bytescale_mask(self):
     a = np.ma.MaskedArray(data=[1, 2, 3], mask=[False, False, True])
     with suppress_warnings() as sup:
         sup.filter(DeprecationWarning)
         actual = misc.bytescale(a)
     expected = [0, 255, 3]
     assert_equal(expected, actual)
     assert_mask_equal(a.mask, actual.mask)
     assert_(isinstance(actual, np.ma.MaskedArray))
 def test_bytescale_mask(self):
     a = np.ma.MaskedArray(data=[1, 2, 3], mask=[False, False, True])
     with suppress_warnings() as sup:
         sup.filter(DeprecationWarning)
         actual = misc.bytescale(a)
     expected = [0, 255, 3]
     assert_equal(expected, actual)
     assert_mask_equal(a.mask, actual.mask)
     assert_(isinstance(actual, np.ma.MaskedArray))