| 160 | assert_(eq(np.concatenate((x, y, x)), concatenate((x, ym, x)))) |
| 161 | |
| 162 | def test_xtestCount(self): |
| 163 | # Test count |
| 164 | ott = array([0., 1., 2., 3.], mask=[1, 0, 0, 0]) |
| 165 | assert_(count(ott).dtype.type is np.intp) |
| 166 | assert_equal(3, count(ott)) |
| 167 | assert_equal(1, count(1)) |
| 168 | assert_(eq(0, array(1, mask=[1]))) |
| 169 | ott = ott.reshape((2, 2)) |
| 170 | assert_(count(ott).dtype.type is np.intp) |
| 171 | assert_(isinstance(count(ott, 0), np.ndarray)) |
| 172 | assert_(count(ott).dtype.type is np.intp) |
| 173 | assert_(eq(3, count(ott))) |
| 174 | assert_(getmask(count(ott, 0)) is nomask) |
| 175 | assert_(eq([1, 2], count(ott, 0))) |
| 176 | |
| 177 | def test_testMinMax(self): |
| 178 | # Test minimum and maximum. |