(self)
| 4843 | assert_equal(mask_or(amask, bmask), cntrl) |
| 4844 | |
| 4845 | def test_flatten_mask(self): |
| 4846 | # Tests flatten mask |
| 4847 | # Standard dtype |
| 4848 | mask = np.array([0, 0, 1], dtype=bool) |
| 4849 | assert_equal(flatten_mask(mask), mask) |
| 4850 | # Flexible dtype |
| 4851 | mask = np.array([(0, 0), (0, 1)], dtype=[('a', bool), ('b', bool)]) |
| 4852 | test = flatten_mask(mask) |
| 4853 | control = np.array([0, 0, 0, 1], dtype=bool) |
| 4854 | assert_equal(test, control) |
| 4855 | |
| 4856 | mdtype = [('a', bool), ('b', [('ba', bool), ('bb', bool)])] |
| 4857 | data = [(0, (0, 0)), (0, (0, 1))] |
| 4858 | mask = np.array(data, dtype=mdtype) |
| 4859 | test = flatten_mask(mask) |
| 4860 | control = np.array([0, 0, 0, 0, 0, 1], dtype=bool) |
| 4861 | assert_equal(test, control) |
| 4862 | |
| 4863 | def test_on_ndarray(self): |
| 4864 | # Test functions on ndarrays |
nothing calls this directly
no test coverage detected