def transform(self, X):
    '[transform Stimulus-encoded to brain-encoded]\n\n        Args:\n            X ([type]): [description]\n\n        Returns:\n            [type]: [description]\n        '
    if (X is None):
        return None
    prevX = self.prevX
    if (self.histlen > 0):
        if ((X.shape[0] >= self.histlen) or (prevX is None)):
            self.prevX = X
        else:
            self.prevX = np.append(prevX, X, 0)
        self.prevX = self.prevX[(- self.histlen):, :].copy()
    X = stim2event(X, self.evtlabs, axis=(- 2), oM=prevX)
    return X
[transform Stimulus-encoded to brain-encoded]

Args:
    X ([type]): [description]

Returns:
    [type]: [description]
def transform(self, X):
    '[transform Stimulus-encoded to brain-encoded]\n\n        Args:\n            X ([type]): [description]\n\n        Returns:\n            [type]: [description]\n        '
    if (X is None):
        return None
    prevX = self.prevX
    if (self.histlen > 0):
        if ((X.shape[0] >= self.histlen) or (prevX is None)):
            self.prevX = X
        else:
            self.prevX = np.append(prevX, X, 0)
        self.prevX = self.prevX[(- self.histlen):, :].copy()
    X = stim2event(X, self.evtlabs, axis=(- 2), oM=prevX)
    return X