Skip to content

Commit

Permalink
Fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Darin Deforest committed Apr 12, 2018
1 parent b1f004e commit dbd1637
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions gensim/models/ldamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,9 @@ def rho():
dirty = False

reallen = 0
for chunk_no, chunk in enumerate(utils.grouper(corpus, chunksize, as_numpy=chunks_as_numpy,
dtype=self.dtype)):
for chunk_no, chunk in enumerate(utils.grouper(
corpus, chunksize, as_numpy=chunks_as_numpy,
dtype=self.dtype)):
reallen += len(chunk) # keep track of how many documents we've processed so far

if eval_every and ((reallen == lencorpus) or ((chunk_no + 1) % (eval_every * self.numworkers) == 0)):
Expand Down
2 changes: 1 addition & 1 deletion gensim/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ def chunkize_serial(iterable, chunksize, as_numpy=False,dtype=np.float32):
if as_numpy:
# convert each document to a 2d numpy array (~6x faster when transmitting
# chunk data over the wire, in Pyro)
wrapped_chunk = [[np.asarray(doc,dtype=dtype) for doc in itertools.islice(it, int(chunksize))]]
wrapped_chunk = [[np.asarray(doc, dtype=dtype) for doc in itertools.islice(it, int(chunksize))]]
else:
wrapped_chunk = [list(itertools.islice(it, int(chunksize)))]
if not wrapped_chunk[0]:
Expand Down

0 comments on commit dbd1637

Please sign in to comment.