docstr: ...Test behavior of new_ptr method
docstr_tok: ["...","Test","behavior","of","new_ptr","method"]
code: def test_new_ptr(self):
      """...Test behavior of new_ptr method"""
      for array_type in self.array_types:
          # This test only concerns non ptr_type arrays
          # This method is not implemented on Base arrays yet
          if Test.is_array_ptr(array_type) or Test.is_base(array_type):
              continue
          test_func = getattr(test, "test_new_ptr_S%sPtr" % array_type)
          test_arrays = self._test_arrays(array_type)
          original_arrays = self._test_arrays(array_type)
          for test_array, original_array in zip(
              test_arrays, original_arrays
          ):
              self.assertAlmostEqual(
                  original_array.sum(), test_func(test_array)
              )
              # Data has been copied and original array should not be affected
              self.compare_arrays(test_array, original_array)
  
imports: import unittest
  import numpy
  from numpy.linalg import norm
  from tick.array_test.build import array_test
  from scipy.sparse import csr_matrix
  import itertools
label_desc: Use image node_id 19 for calling the Test obj's underlying member method code with example usage: obj.test_new_ptr() without return types