code: def __obj_array_handler__(array, classes, transpose):
      """
      Handle object conditions for the array.
  
      :param matrix: the confusion matrix in array form
      :type matrix: list or np.array
      :param classes: ordered labels of classes
      :type classes: list
      :param transpose: transpose flag
      :type transpose: bool
      :return: matrix parameters as list
      """
      if classes is not None and len(set(classes)) != len(classes):
          raise pycmMatrixError(VECTOR_UNIQUE_CLASS_ERROR)
      if classes is None:
          classes = list(range(len(array)))
      if len(classes) != len(array):
          raise pycmMatrixError(CLASSES_LENGHT_ERROR)
      matrix = {}
      for i in range(len(array)):
          matrix[classes[i]] = {
              classes[j]: x for j, x in enumerate(array[i])
          }
      return __obj_matrix_handler__(matrix, classes, transpose)
  
file_path: pycm/pycm/pycm_handler.py
imports: from __future__ import division
  from .pycm_class_func import class_statistics
  from .pycm_error import pycmVectorError, pycmMatrixError
  from .pycm_overall_func import overall_statistics
  from .pycm_util import *
  from .pycm_param import *
  import json
  import types
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: __obj_array_handler__(array, classes, transpose) and returns: __obj_matrix_handler__