8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d866609 commit 1d39546Copy full SHA for 1d39546
sklearn/decomposition/_incremental_pca.py
@@ -410,12 +410,13 @@ def transform(self, X):
410
"""
411
if sparse.issparse(X):
412
n_samples = X.shape[0]
413
- output = [
414
- super().transform(X[batch].toarray())
415
- for batch in gen_batches(
416
- n_samples, self.batch_size_, min_batch_size=self.n_components or 0
+ output = []
+ for batch in gen_batches(
+ n_samples, self.batch_size_, min_batch_size=self.n_components or 0
+ ):
417
+ output.append( # noqa: PERF401 # FIXME
418
+ super().transform(X[batch].toarray())
419
)
- ]
420
return np.vstack(output)
421
else:
422
return super().transform(X)
0 commit comments