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

Method test_minmax

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

Source from the content-addressed store, hash-verified

827 assert_equal(product(a, axis=0), 0)
828
829 def test_minmax(self):
830 a = arange(1, 13).reshape(3, 4)
831 amask = masked_where(a < 5, a)
832 assert_equal(amask.max(), a.max())
833 assert_equal(amask.min(), 5)
834 assert_((amask.max(0) == a.max(0)).all())
835 assert_((amask.min(0) == [5, 6, 7, 8]).all())
836 assert_(amask.max(1)[0].mask)
837 assert_(amask.min(1)[0].mask)
838
839 def test_nonzero(self):
840 for t in "?bhilqpBHILQPfdgFDGO":

Callers

nothing calls this directly

Calls 7

masked_whereFunction · 0.90
assert_equalFunction · 0.90
assert_Function · 0.90
reshapeMethod · 0.80
maxMethod · 0.45
minMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected