Skip to content

Commit

Permalink
Removed unnecessary numpy imports (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhargavvader authored and tmylk committed Dec 31, 2016
1 parent 49ede4d commit 5bae0a9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions gensim/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,6 @@ def chunkize_serial(iterable, chunksize, as_numpy=False):
[[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]
"""
import numpy as np
it = iter(iterable)
while True:
if as_numpy:
Expand All @@ -827,8 +826,6 @@ def __init__(self, q, corpus, chunksize, maxsize, as_numpy):
self.as_numpy = as_numpy

def run(self):
if self.as_numpy:
import np # don't clutter the global namespace with a dependency on numpy
it = iter(self.corpus)
while True:
chunk = itertools.islice(it, self.chunksize)
Expand Down

0 comments on commit 5bae0a9

Please sign in to comment.