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

Method test_allany_oddities

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

Source from the content-addressed store, hash-verified

3401 assert_equal(mxsmall.any(1), [True, True, False])
3402
3403 def test_allany_oddities(self):
3404 # Some fun with all and any
3405 store = empty((), dtype=bool)
3406 full = array([1, 2, 3], mask=True)
3407
3408 assert_(full.all() is masked)
3409 full.all(out=store)
3410 assert_(store)
3411 assert_(store._mask, True)
3412 assert_(store is not masked)
3413
3414 store = empty((), dtype=bool)
3415 assert_(full.any() is masked)
3416 full.any(out=store)
3417 assert_(not store)
3418 assert_(store._mask, True)
3419 assert_(store is not masked)
3420
3421 def test_argmax_argmin(self):
3422 # Tests argmin & argmax on MaskedArrays.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected