Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary numpy imports in Utils #1065

Merged
merged 1 commit into from
Dec 31, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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