(self)
| 1073 | assert_equal(median(x, axis=1).mask, [1, 1, 1, 0, 0, 0, 0, 1, 1, 1]) |
| 1074 | |
| 1075 | def test_3d(self): |
| 1076 | # Tests median w/ 3D |
| 1077 | x = np.ma.arange(24).reshape(3, 4, 2) |
| 1078 | x[x % 3 == 0] = masked |
| 1079 | assert_equal(median(x, 0), [[12, 9], [6, 15], [12, 9], [18, 15]]) |
| 1080 | x = x.reshape((4, 3, 2)) |
| 1081 | assert_equal(median(x, 0), [[99, 10], [11, 99], [13, 14]]) |
| 1082 | x = np.ma.arange(24).reshape(4, 3, 2) |
| 1083 | x[x % 5 == 0] = masked |
| 1084 | assert_equal(median(x, 0), [[12, 10], [8, 9], [16, 17]]) |
| 1085 | |
| 1086 | def test_neg_axis(self): |
| 1087 | x = masked_array(np.arange(30).reshape(10, 3)) |
nothing calls this directly
no test coverage detected