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

Method test_ptp

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

Source from the content-addressed store, hash-verified

114 assert_equal(np.min(x, axis=1), matrix([[1], [4]]))
115
116 def test_ptp(self):
117 x = np.arange(4).reshape((2, 2))
118 mx = x.view(np.matrix)
119 assert_(mx.ptp() == 3)
120 assert_(np.all(mx.ptp(0) == np.array([2, 2])))
121 assert_(np.all(mx.ptp(1) == np.array([1, 1])))
122
123 def test_var(self):
124 x = np.arange(9).reshape((3, 3))

Callers

nothing calls this directly

Calls 5

assert_Function · 0.90
reshapeMethod · 0.80
viewMethod · 0.45
ptpMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected