code: def _indexes(arr):
      
      myarr = np.array(arr)
      if myarr.ndim == 1:
          return list(range(len(myarr)))
      elif myarr.ndim == 2:
          return tuple(itertools.product(list(range(arr.shape[0])),
                                         list(range(arr.shape[1]))))
      else:
          raise NotImplementedError('Only supporting arrays of dimension 1 and 2 as yet.')
docs: Returns the list of all indexes of the given array.
  
      Currently works for one and two-dimensional arrays