MCPcopy Index your code
hub / github.com/numpy/numpy / test_xtestCount

Method test_xtestCount

numpy/ma/tests/test_old_ma.py:224–237  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 7

arrayFunction · 0.90
assert_Function · 0.90
assert_equalFunction · 0.90
getmaskFunction · 0.90
countFunction · 0.85
eqFunction · 0.85
reshapeMethod · 0.80

Tested by

no test coverage detected