| 222 | assert_(eq(np.concatenate((x, y, x)), concatenate((x, ym, x)))) |
| 223 | |
| 224 | def test_xtestCount(self): |
| 225 | # Test count |
| 226 | ott = array([0., 1., 2., 3.], mask=[1, 0, 0, 0]) |
| 227 | assert_(count(ott).dtype.type is np.intp) |
| 228 | assert_equal(3, count(ott)) |
| 229 | assert_equal(1, count(1)) |
| 230 | assert_(eq(0, array(1, mask=[1]))) |
| 231 | ott = ott.reshape((2, 2)) |
| 232 | assert_(count(ott).dtype.type is np.intp) |
| 233 | assert_(isinstance(count(ott, 0), np.ndarray)) |
| 234 | assert_(count(ott).dtype.type is np.intp) |
| 235 | assert_(eq(3, count(ott))) |
| 236 | assert_(getmask(count(ott, 0)) is nomask) |
| 237 | assert_(eq([1, 2], count(ott, 0))) |
| 238 | |
| 239 | def test_testMinMax(self): |
| 240 | # Test minimum and maximum. |