MCPcopy
hub / github.com/numpy/numpy / test_max

Method test_max

numpy/matrixlib/tests/test_defmatrix.py:96–104  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

94 assert_(y.prod() == 0)
95
96 def test_max(self):
97 x = matrix([[1, 2, 3], [4, 5, 6]])
98 assert_equal(x.max(), 6)
99 assert_equal(x.max(0), matrix([[4, 5, 6]]))
100 assert_equal(x.max(1), matrix([[3], [6]]))
101
102 assert_equal(np.max(x), 6)
103 assert_equal(np.max(x, axis=0), matrix([[4, 5, 6]]))
104 assert_equal(np.max(x, axis=1), matrix([[3], [6]]))
105
106 def test_min(self):
107 x = matrix([[1, 2, 3], [4, 5, 6]])

Callers

nothing calls this directly

Calls 3

matrixClass · 0.90
assert_equalFunction · 0.90
maxMethod · 0.45

Tested by

no test coverage detected