'Reduce X to the selected features.
Parameters
X : array of shape [n_samples, n_features]
The input samples.
Returns
X_r : array of shape [n_samples, n_selected_features]
The input samples with only the selected features.'

def transform(self, X):

    X = check_array(X, accept_sparse='csr')
    mask = self.get_support()
    if (not mask.any()):
        warn('No    features    were    selected:    either    the    data    is    too    noisy    or    the    selection    test    too    strict.', UserWarning)
        return np.empty(0).reshape((X.shape[0], 0))
    if (len(mask) != X.shape[1]):
        raise ValueError('X    has    a    different    shape    than    during    fitting.')
    return X[:, safe_mask(X, mask)]
