(self)
| 4123 | assert_equal(test.mask, [1, 1, 1]) |
| 4124 | |
| 4125 | def test_diag(self): |
| 4126 | # Test diag |
| 4127 | x = arange(9).reshape((3, 3)) |
| 4128 | x[1, 1] = masked |
| 4129 | out = np.diag(x) |
| 4130 | assert_equal(out, [0, 4, 8]) |
| 4131 | out = diag(x) |
| 4132 | assert_equal(out, [0, 4, 8]) |
| 4133 | assert_equal(out.mask, [0, 1, 0]) |
| 4134 | out = diag(out) |
| 4135 | control = array([[0, 0, 0], [0, 4, 0], [0, 0, 8]], |
| 4136 | mask=[[0, 0, 0], [0, 1, 0], [0, 0, 0]]) |
| 4137 | assert_equal(out, control) |
| 4138 | |
| 4139 | def test_axis_methods_nomask(self): |
| 4140 | # Test the combination nomask & methods w/ axis |
nothing calls this directly
no test coverage detected