def _process_quantiles(x, dim):
 x = np.asarray(x, dtype=float)
 if (x.ndim == 0):
  x = x[np.newaxis]
 elif (x.ndim == 1):
  if (dim == 1):
   x = x[:, np.newaxis]
  else:
   x = x[np.newaxis, :]
 return x

def _process_quantiles ( x , dim ) : x = np . asarray ( x , dtype = float ) if ( x . ndim == 0 ) : x = x [ np . newaxis ] elif ( x . ndim == 1 ) : if ( dim == 1 ) : x = x [ : , np . newaxis ] else : x = x [ np . newaxis , : ] return x
adjust quantiles array so that last axis labels the components of each data point .