mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix itershuffle
This commit is contained in:
parent
b59765ca9f
commit
31b156d60b
|
@ -451,7 +451,7 @@ def itershuffle(iterable, bufsize=1000):
|
|||
try:
|
||||
while True:
|
||||
for i in range(random.randint(1, bufsize-len(buf))):
|
||||
buf.append(iterable.next())
|
||||
buf.append(next(iterable))
|
||||
random.shuffle(buf)
|
||||
for i in range(random.randint(1, bufsize)):
|
||||
if buf:
|
||||
|
|
Loading…
Reference in New Issue
Block a user