'Transform 2D data back to its original feature shape.
Parameters
X : array-like, shape (n_samples,  n_features)
Data to be transformed back to original shape.
Returns
X : array
The data transformed into shape as used in fit. The first
dimension is of length n_samples.'

def inverse_transform(self, X):

    X = np.asarray(X)
    if (X.ndim != 2):
        raise ValueError(('X    should    be    of    2    dimensions    but    given    has    %s    dimension(s)' % X.ndim))
    return X.reshape(((len(X),) + self.features_shape_))
