Skip to content

Commit

Permalink
Refactoring handling tuple result from struct.unpack (piskvorky#2611)
Browse files Browse the repository at this point in the history
  • Loading branch information
lopusz committed Jan 5, 2020
1 parent 03a777c commit d087074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gensim/models/_fasttext_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _load_vocab(fin, new_format, encoding='utf-8'):
raise NotImplementedError("Supervised fastText models are not supported")
logger.info("loading %s words for fastText model from %s", vocab_size, fin.name)

ntokens, = _struct_unpack(fin, '@q') # number of tokens
ntokens = _struct_unpack(fin, '@q')[0] # number of tokens

if new_format:
pruneidx_size, = _struct_unpack(fin, '@q')
Expand Down

0 comments on commit d087074

Please sign in to comment.