(self)
| 985 | assert_equal(median(x, axis=1).mask, [1, 1, 1, 0, 0, 0, 0, 1, 1, 1]) |
| 986 | |
| 987 | def test_3d(self): |
| 988 | # Tests median w/ 3D |
| 989 | x = np.ma.arange(24).reshape(3, 4, 2) |
| 990 | x[x % 3 == 0] = masked |
| 991 | assert_equal(median(x, 0), [[12, 9], [6, 15], [12, 9], [18, 15]]) |
| 992 | x.shape = (4, 3, 2) |
| 993 | assert_equal(median(x, 0), [[99, 10], [11, 99], [13, 14]]) |
| 994 | x = np.ma.arange(24).reshape(4, 3, 2) |
| 995 | x[x % 5 == 0] = masked |
| 996 | assert_equal(median(x, 0), [[12, 10], [8, 9], [16, 17]]) |
| 997 | |
| 998 | def test_neg_axis(self): |
| 999 | x = masked_array(np.arange(30).reshape(10, 3)) |
nothing calls this directly
no test coverage detected