(self)
| 5117 | assert_equal(test, m.reshape(2, 2)) |
| 5118 | |
| 5119 | def test_compress(self): |
| 5120 | # Test compress function on ndarray and masked array |
| 5121 | # Address Github #2495. |
| 5122 | arr = np.arange(8).reshape(4, 2) |
| 5123 | cond = np.array([True, False, True, True]) |
| 5124 | control = arr[[0, 2, 3]] |
| 5125 | test = np.ma.compress(cond, arr, axis=0) |
| 5126 | assert_equal(test, control) |
| 5127 | marr = np.ma.array(arr) |
| 5128 | test = np.ma.compress(cond, marr, axis=0) |
| 5129 | assert_equal(test, control) |
| 5130 | |
| 5131 | def test_compressed(self): |
| 5132 | # Test ma.compressed function. |
nothing calls this directly
no test coverage detected