(self)
| 125 | assert_equal(masked_arr['b']._fill_value.shape, ()) |
| 126 | |
| 127 | def test_masked_all_like(self): |
| 128 | # Tests masked_all |
| 129 | # Standard dtype |
| 130 | base = array([1, 2], dtype=float) |
| 131 | test = masked_all_like(base) |
| 132 | control = array([1, 1], mask=[1, 1], dtype=float) |
| 133 | assert_equal(test, control) |
| 134 | # Flexible dtype |
| 135 | dt = np.dtype({'names': ['a', 'b'], 'formats': ['f', 'f']}) |
| 136 | base = array([(0, 0), (0, 0)], mask=[(1, 1), (1, 1)], dtype=dt) |
| 137 | test = masked_all_like(base) |
| 138 | control = array([(10, 10), (10, 10)], mask=[(1, 1), (1, 1)], dtype=dt) |
| 139 | assert_equal(test, control) |
| 140 | # Nested dtype |
| 141 | dt = np.dtype([('a', 'f'), ('b', [('ba', 'f'), ('bb', 'f')])]) |
| 142 | control = array([(1, (1, 1)), (1, (1, 1))], |
| 143 | mask=[(1, (1, 1)), (1, (1, 1))], dtype=dt) |
| 144 | test = masked_all_like(control) |
| 145 | assert_equal(test, control) |
| 146 | |
| 147 | def check_clump(self, f): |
| 148 | for i in range(1, 7): |
nothing calls this directly
no test coverage detected