class_docstr: !
  @brief Package builder provides service to create 'pyclustering_package' from data that is stored in 'list' container.
class_docstr_tok: ["!","@","brief","Package","builder","provides","service","to","create","'pyclustering_package","'","from","data","that","is","stored","in","'list","'","container","."]
code: def __create_package_numpy_matrix(self, dataset_package, dataset):
      (rows, cols) = dataset.shape
  
      dataset_package.size = rows
      dataset_package.type = (
          pyclustering_type_data.PYCLUSTERING_TYPE_LIST
      )
  
      package_data = (POINTER(pyclustering_package) * rows)()
      for row_index in range(rows):
          array_package = pyclustering_package()
          array_package.size = cols
          array_package.type = (
              pyclustering_type_data.get_pyclustering_type(
                  self.__c_data_type
              )
          )
  
          array_object = (self.__c_data_type * cols)()
          for col_index in range(cols):
              array_object[col_index] = self.__c_data_type(
                  dataset[row_index, col_index]
              )
  
          array_package.data = cast(array_object, POINTER(c_void_p))
          package_data[row_index] = pointer(array_package)
  
      dataset_package.data = cast(package_data, POINTER(c_void_p))
      return pointer(dataset_package)
  
imports: from ctypes import *
  import collections.abc
  import numpy
label_desc: Use image node_id 10 for calling the package_builder obj's underlying member method code with example usage: obj.__create_package_numpy_matrix(dataset_package, dataset) and returns: pointer