Skip to content

Commit 61447db

Browse files
ergamueller
authored andcommitted
COSMIT: Fix up a loop.
1 parent a7e1231 commit 61447db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/ensemble/forest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def fit(self, X, y, sample_weight=None):
357357
n_jobs, n_trees, _ = _partition_trees(self)
358358

359359
# Precalculate the random states
360-
seeds = [random_state.randint(MAX_INT, size=n_trees[i]) for i in xrange(len(n_trees))]
360+
seeds = [random_state.randint(MAX_INT, size=i) for i in n_trees]
361361

362362
# Parallel loop
363363
all_trees = Parallel(n_jobs=n_jobs, verbose=self.verbose)(

0 commit comments

Comments
 (0)