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

Method test_arraymethod

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

Source from the content-addressed store, hash-verified

3820 assert_equal(test.data, a.data)
3821
3822 def test_arraymethod(self):
3823 # Test a _arraymethod w/ n argument
3824 marray = masked_array([[1, 2, 3, 4, 5]], mask=[0, 0, 1, 0, 0])
3825 control = masked_array([[1], [2], [3], [4], [5]],
3826 mask=[0, 0, 1, 0, 0])
3827 assert_equal(marray.T, control)
3828 assert_equal(marray.transpose(), control)
3829
3830 assert_equal(MaskedArray.cumsum(marray.T, 0), control.cumsum(0))
3831
3832 def test_arraymethod_0d(self):
3833 # gh-9430

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
cumsumMethod · 0.80

Tested by

no test coverage detected