code: def test_ptp(self):
      x = np.arange(4).reshape((2, 2))
      mx = x.view(np.matrix)
      assert_(mx.ptp() == 3)
      assert_(np.all(mx.ptp(0) == np.array([2, 2])))
      assert_(np.all(mx.ptp(1) == np.array([1, 1])))
  
imports: import collections.abc
  import numpy
  from numpy import matrix, asmatrix, bmat
  from numpy.testing import assert_, assert_equal, assert_almost_equal, assert_array_equal, assert_array_almost_equal, assert_raises
  from numpy.linalg import matrix_power
label_desc: Use image node_id 5 for calling the TestProperties obj's underlying member method code with example usage: obj.test_ptp() without return types