'Standardize or demean data.'

def _prepare_data(self):

    adj_data = self._adjusted_data
    if np.all(np.isnan(adj_data)):
        return np.empty(adj_data.shape[1]).fill(np.nan)
    self._mu = np.nanmean(adj_data, axis=0)
    self._sigma = np.sqrt(np.nanmean(((adj_data - self._mu) ** 2.0), axis=0))
    if self._standardize:
        data = ((adj_data - self._mu) / self._sigma)
    elif self._demean:
        data = (adj_data - self._mu)
    else:
        data = adj_data
    return (data / np.sqrt(self.weights))
