'Transform data with spatial filters.
Parameters
X : array, shape (n_epochs, n_channels, n_samples)
The target data.
Returns
X : array, shape (n_epochs, n_components * n_classes, n_samples)
The transformed data.'

def transform(self, X):

    (X, _) = self._check_Xy(X)
    if (self.filters_.shape[1] != X.shape[1]):
        raise ValueError(('X    must    have    %i    channels,    got    %i    instead.' % (self.filters_.shape[1], X.shape[1])))
    X = np.dot(self.filters_, X)
    X = X.transpose((1, 0, 2))
    return X
