(self)
| 4870 | assert_equal(test, m.reshape(2, 2)) |
| 4871 | |
| 4872 | def test_compress(self): |
| 4873 | # Test compress function on ndarray and masked array |
| 4874 | # Address Github #2495. |
| 4875 | arr = np.arange(8) |
| 4876 | arr.shape = 4, 2 |
| 4877 | cond = np.array([True, False, True, True]) |
| 4878 | control = arr[[0, 2, 3]] |
| 4879 | test = np.ma.compress(cond, arr, axis=0) |
| 4880 | assert_equal(test, control) |
| 4881 | marr = np.ma.array(arr) |
| 4882 | test = np.ma.compress(cond, marr, axis=0) |
| 4883 | assert_equal(test, control) |
| 4884 | |
| 4885 | def test_compressed(self): |
| 4886 | # Test ma.compressed function. |
nothing calls this directly
no test coverage detected