'Convert given array into two dimensions.
Parameters
X : array-like
The data to fit. Can be, for example a list, or an array of at
least 2d. The first dimension must be of length n_samples, where
samples are the independent samples used by the estimator
(e.g. n_epochs for epoched data).
Returns
X : array, shape (n_samples, n_features)
The transformed data.'

def transform(self, X):

    X = np.asarray(X)
    if (X.shape[1:] != self.features_shape_):
        raise ValueError('Shape    of    X    used    in    fit    and    transform    must    be    same')
    return X.reshape(len(X), (-1))
