'Fit transformer by checking X.
If ``validate`` is ``True``, ``X`` will be checked.
Parameters
X : array-like, shape (n_samples, n_features)
Input array.
Returns
self'

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

    if self.validate:
        check_array(X, self.accept_sparse)
    return self
