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

Method test_reduce

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

Source from the content-addressed store, hash-verified

2481 assert_mask_equal(ur.mask, mr.mask, err_msg=f)
2482
2483 def test_reduce(self):
2484 # Tests reduce on MaskedArrays.
2485 a = self.d[0]
2486 assert_(not alltrue(a, axis=0))
2487 assert_(sometrue(a, axis=0))
2488 assert_equal(sum(a[:3], axis=0), 0)
2489 assert_equal(product(a, axis=0), 0)
2490 assert_equal(add.reduce(a), pi)
2491
2492 def test_minmax(self):
2493 # Tests extrema on MaskedArrays.

Callers

nothing calls this directly

Calls 7

alltrueFunction · 0.90
sometrueFunction · 0.90
assert_equalFunction · 0.90
sumFunction · 0.90
productFunction · 0.90
assert_Function · 0.50
reduceMethod · 0.45

Tested by

no test coverage detected