Skip to content

Commit

Permalink
added item to get explicit python scalar type
Browse files Browse the repository at this point in the history
  • Loading branch information
hechth committed Nov 7, 2024
1 parent 6c43d1b commit ca32ff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gensim/models/keyedvectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@ def _word2vec_read_text(fin, kv, counts, vocab_size, vector_size, datatype, unic

def _word2vec_line_to_vector(line, datatype, unicode_errors, encoding):
parts = utils.to_unicode(line.rstrip(), encoding=encoding, errors=unicode_errors).split(" ")
word, weights = parts[0], [datatype(x) for x in parts[1:]]
word, weights = parts[0], [datatype(x).item() for x in parts[1:]]
return word, weights


Expand Down

0 comments on commit ca32ff0

Please sign in to comment.