def _mult_cal_one(data_view, one, idx, cals, mult):
 one = np.asarray(one, dtype=data_view.dtype)
 assert (data_view.shape[1] == one.shape[1])
 if (mult is not None):
  data_view[:] = np.dot(mult, one)
 else:
  if isinstance(idx, slice):
   data_view[:] = one[idx]
  else:
   np.take(one, idx, axis=0, out=data_view)
  if (cals is not None):
   data_view *= cals

def _mult_cal_one ( data_view , one , idx , cals , mult ) : one = np . asarray ( one , dtype = data_view . dtype ) assert ( data_view . shape [ 1 ] == one . shape [ 1 ] ) if ( mult is not None ) : data_view [ : ] = np . dot ( mult , one ) else : if isinstance ( idx , slice ) : data_view [ : ] = one [ idx ] else : np . take ( one , idx , axis = 0 , out = data_view ) if ( cals is not None ) : data_view *= cals
take a chunk of raw data .