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

Method test_reduce

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

Source from the content-addressed store, hash-verified

2671 assert_mask_equal(ur.mask, mr.mask, err_msg=f)
2672
2673 def test_reduce(self):
2674 # Tests reduce on MaskedArrays.
2675 a = self._create_data()[0]
2676 assert_(not alltrue(a, axis=0))
2677 assert_(sometrue(a, axis=0))
2678 assert_equal(sum(a[:3], axis=0), 0)
2679 assert_equal(product(a, axis=0), 0)
2680 assert_equal(add.reduce(a), pi)
2681
2682 def test_minmax(self):
2683 # Tests extrema on MaskedArrays.

Callers

nothing calls this directly

Calls 5

_create_dataMethod · 0.95
assert_equalFunction · 0.90
sumFunction · 0.90
assert_Function · 0.85
reduceMethod · 0.45

Tested by

no test coverage detected