def get_list_of_comp_dicts( K, Dict ):
  ''' We store all component params stacked together in an array.
      This function extracts them into individual components.
  '''
  MyList = [ dict() for k in xrange(K)]
  for k in xrange(K):
    for key in Dict:
      if type(Dict[key]) is not np.ndarray:
        continue
      x = Dict[key]
      if K == 1 and (key != 'min_covar' and key != 'K'):
        MyList[k][key] = x.copy()
      elif x.ndim == 1 and 1 > x.size:
        MyList[k][key] = x[k].copy()
      elif x.ndim == 2:
        MyList[k][key] = x[:,k].copy()
      elif x.ndim == 3:
        MyList[k][key] = x[:,:,k].copy()
  return MyList
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/ioutil/ModelReader.py/get_list_of_comp_dicts/swapped operands of `>`