8000 MAINT silence mypy · scikit-learn/scikit-learn@1d39546 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d39546

Browse files
MAINT silence mypy
1 parent d866609 commit 1d39546

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

sklearn/decomposition/_incremental_pca.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,13 @@ def transform(self, X):
410410
"""
411411
if sparse.issparse(X):
412412
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
413+
output = []
414+
for batch in gen_batches(
415+
n_samples, self.batch_size_, min_batch_size=self.n_components or 0
416+
):
417+
output.append( # noqa: PERF401 # FIXME
418+
super().transform(X[batch].toarray())
417419
)
418-
]
419420
return np.vstack(output)
420421
else:
421422
return super().transform(X)

0 commit comments

Comments
 (0)
0