Skip to content

Commit 0a4b85b

Browse files
committed
replace itertools.repeat with six.moves.range
1 parent afeb7ee commit 0a4b85b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sklearn/grid_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from abc import ABCMeta, abstractmethod
1414
from collections import Mapping, namedtuple, Sized
1515
from functools import partial, reduce
16-
from itertools import product, repeat
16+
from itertools import product
1717
import operator
1818
import warnings
1919

@@ -193,7 +193,7 @@ def __iter__(self):
193193
else:
194194
# Always sort the keys of a dictionary, for reproducibility
195195
items = sorted(self.param_distributions.items())
196-
for _ in repeat(None, self.n_iter):
196+
for _ in six.moves.range(self.n_iter):
197197
params = dict()
198198
for k, v in items:
199199
if hasattr(v, "rvs"):

0 commit comments

Comments
 (0)