docstr: ...Test we can pass an BaseArray as argument for sparse and dense
  arrays
docstr_tok: ["...","Test","we","can","pass","an","BaseArray","as","argument","for","sparse","and","dense","arrays"]
code: def test_sbasearray_ptr_typemap_in(self):
      """...Test we can pass an BaseArray as argument for sparse and dense
      arrays
      """
      for array_type, info in self.correspondence_dict.items():
          python_array = info["python_array"]
          python_sparse_array = info["python_sparse_array"]
          extract_function = info["typemap_in_base_array_ptr"]
          # Test dense
          self.assertEqual(
              python_array.sum(), extract_function(python_array)
          )
          # Test sparse
          self.assertEqual(
              python_sparse_array.data.sum(),
              extract_function(python_sparse_array),
          )
          self.assertEqual(
              info["number"], extract_function(info["number"])
          )
  
imports: import unittest
  import numpy
  from scipy.sparse import csr_matrix
  from tick.array_test.build import array_test
label_desc: Use image node_id 21 for calling the Test obj's underlying member method code with example usage: obj.test_sbasearray_ptr_typemap_in() without return types