'Adjust quantiles array so that last axis labels the components of
each data point.'

def _process_quantiles(self, 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
