check_is_fitted(self)
X = check_array(X)
if len(self.labels_) != X.shape[1]:
raise ValueError("X has a different number of features than "
"during fitting.")
if self.pooling_func == np.mean and not issparse(X):
After Change
check_is_fitted(self)
X = self._validate_data(X, reset=False)
if self.pooling_func == np.mean and not issparse(X):
size = np.bincount(self.labels_)
n_samples = X.shape[0]
// a fast way to compute the mean of grouped features