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

Method test_testArrayMethods

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

Source from the content-addressed store, hash-verified

727 assert_equal(str(xm), str(masked_print_option))
728
729 def test_testArrayMethods(self):
730 a = array([1, 3, 2])
731 assert_(eq(a.any(), a._data.any()))
732 assert_(eq(a.all(), a._data.all()))
733 assert_(eq(a.argmax(), a._data.argmax()))
734 assert_(eq(a.argmin(), a._data.argmin()))
735 assert_(eq(a.choose(0, 1, 2, 3, 4),
736 a._data.choose(0, 1, 2, 3, 4)))
737 assert_(eq(a.compress([1, 0, 1]), a._data.compress([1, 0, 1])))
738 assert_(eq(a.conj(), a._data.conj()))
739 assert_(eq(a.conjugate(), a._data.conjugate()))
740 m = array([[1, 2], [3, 4]])
741 assert_(eq(m.diagonal(), m._data.diagonal()))
742 assert_(eq(a.sum(), a._data.sum()))
743 assert_(eq(a.take([1, 2]), a._data.take([1, 2])))
744 assert_(eq(m.transpose(), m._data.transpose()))
745
746 def test_testArrayAttributes(self):
747 a = array([1, 3, 2])

Callers

nothing calls this directly

Calls 11

arrayFunction · 0.90
assert_Function · 0.90
eqFunction · 0.85
compressMethod · 0.80
conjugateMethod · 0.80
takeMethod · 0.80
anyMethod · 0.45
allMethod · 0.45
argmaxMethod · 0.45
argminMethod · 0.45
sumMethod · 0.45

Tested by

no test coverage detected