(self)
| 106 | assert_(x.filled().dtype is x._data.dtype) |
| 107 | |
| 108 | def test_basic1d(self): |
| 109 | # Test of basic array creation and properties in 1 dimension. |
| 110 | (x, y, a10, m1, m2, xm, ym, z, zm, xf) = self.d |
| 111 | assert_(not isMaskedArray(x)) |
| 112 | assert_(isMaskedArray(xm)) |
| 113 | assert_((xm - ym).filled(0).any()) |
| 114 | fail_if_equal(xm.mask.astype(int), ym.mask.astype(int)) |
| 115 | s = x.shape |
| 116 | assert_equal(np.shape(xm), s) |
| 117 | assert_equal(xm.shape, s) |
| 118 | assert_equal(xm.dtype, x.dtype) |
| 119 | assert_equal(zm.dtype, z.dtype) |
| 120 | assert_equal(xm.size, reduce(lambda x, y:x * y, s)) |
| 121 | assert_equal(count(xm), len(m1) - reduce(lambda x, y:x + y, m1)) |
| 122 | assert_array_equal(xm, xf) |
| 123 | assert_array_equal(filled(xm, 1.e20), xf) |
| 124 | assert_array_equal(x, xm) |
| 125 | |
| 126 | def test_basic2d(self): |
| 127 | # Test of basic array creation and properties in 2 dimensions. |
nothing calls this directly
no test coverage detected