'Delay and reshape the variables.'

def _delay_and_reshape(self, X, y=None):

    if (not isinstance(self.estimator_, TimeDelayingRidge)):
        X_del = _delay_time_series(X, self.tmin, self.tmax, self.sfreq, newaxis=X.ndim, fill_mean=self.fit_intercept)
    else:
        X_del = X[..., np.newaxis]
    X_del = _reshape_for_est(X_del)
    if (y is not None):
        y = y.reshape((-1), y.shape[(-1)], order='F')
    return (X_del, y)
