示例#1
0
 def test_masked(self):
     shape = (3, 4, 5)
     array = ConstantArray(shape)
     result = array.masked_array()
     self.assertTrue(np.ma.isMaskedArray(result))
示例#2
0
 def test_values(self):
     shape = (3, 4, 5)
     array = ConstantArray(shape)
     result = array.masked_array()
     np.testing.assert_array_equal(result, np.ma.zeros(shape))
示例#3
0
 def test_dtype_default(self):
     shape = (3, 4, 5)
     array = ConstantArray(shape)
     result = array.masked_array()
     self.assertEqual(result.dtype, np.dtype('f8'))
示例#4
0
 def test_masked(self):
     shape = (3, 4, 5)
     array = ConstantArray(shape)
     result = array.masked_array()
     self.assertTrue(np.ma.isMaskedArray(result))
示例#5
0
 def test_dtype_default(self):
     shape = (3, 4, 5)
     array = ConstantArray(shape)
     result = array.masked_array()
     self.assertEqual(result.dtype, np.dtype("f8"))
示例#6
0
 def test_values(self):
     shape = (3, 4, 5)
     array = ConstantArray(shape)
     result = array.masked_array()
     np.testing.assert_array_equal(result, np.ma.zeros(shape))
示例#7
0
 def test_dtype(self):
     shape = (3, 4, 5)
     array = ConstantArray(shape, dtype='i4')
     result = array.masked_array()
     self.assertEqual(result.dtype, np.dtype('i4'))