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

Method test_minmax

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

Source from the content-addressed store, hash-verified

764 assert_equal(product(a, axis=0), 0)
765
766 def test_minmax(self):
767 a = arange(1, 13).reshape(3, 4)
768 amask = masked_where(a < 5, a)
769 assert_equal(amask.max(), a.max())
770 assert_equal(amask.min(), 5)
771 assert_((amask.max(0) == a.max(0)).all())
772 assert_((amask.min(0) == [5, 6, 7, 8]).all())
773 assert_(amask.max(1)[0].mask)
774 assert_(amask.min(1)[0].mask)
775
776 def test_nonzero(self):
777 for t in "?bhilqpBHILQPfdgFDGO":

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected