MCPcopy Create free account
hub / github.com/numpy/numpy / test_allany_oddities

Method test_allany_oddities

numpy/ma/tests/test_core.py:3189–3205  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3187 assert_equal(mxsmall.any(1), [True, True, False])
3188
3189 def test_allany_oddities(self):
3190 # Some fun with all and any
3191 store = empty((), dtype=bool)
3192 full = array([1, 2, 3], mask=True)
3193
3194 assert_(full.all() is masked)
3195 full.all(out=store)
3196 assert_(store)
3197 assert_(store._mask, True)
3198 assert_(store is not masked)
3199
3200 store = empty((), dtype=bool)
3201 assert_(full.any() is masked)
3202 full.any(out=store)
3203 assert_(not store)
3204 assert_(store._mask, True)
3205 assert_(store is not masked)
3206
3207 def test_argmax_argmin(self):
3208 # Tests argmin & argmax on MaskedArrays.

Callers

nothing calls this directly

Calls 5

arrayFunction · 0.90
emptyFunction · 0.50
assert_Function · 0.50
allMethod · 0.45
anyMethod · 0.45

Tested by

no test coverage detected