MCPcopy
hub / github.com/numpy/numpy / test_arraymethod

Method test_arraymethod

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

Source from the content-addressed store, hash-verified

4058 assert_equal(test.data, a.data)
4059
4060 def test_arraymethod(self):
4061 # Test a _arraymethod w/ n argument
4062 marray = masked_array([[1, 2, 3, 4, 5]], mask=[0, 0, 1, 0, 0])
4063 control = masked_array([[1], [2], [3], [4], [5]],
4064 mask=[0, 0, 1, 0, 0])
4065 assert_equal(marray.T, control)
4066 assert_equal(marray.transpose(), control)
4067
4068 assert_equal(MaskedArray.cumsum(marray.T, 0), control.cumsum(0))
4069
4070 def test_arraymethod_0d(self):
4071 # gh-9430

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
cumsumMethod · 0.80

Tested by

no test coverage detected