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

Method test_ptp

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

Source from the content-addressed store, hash-verified

110 assert_equal(np.min(x, axis=1), matrix([[1], [4]]))
111
112 def test_ptp(self):
113 x = np.arange(4).reshape((2, 2))
114 assert_(x.ptp() == 3)
115 assert_(np.all(x.ptp(0) == np.array([2, 2])))
116 assert_(np.all(x.ptp(1) == np.array([1, 1])))
117
118 def test_var(self):
119 x = np.arange(9).reshape((3, 3))

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected