datatype
parameter in load_word2vec_format
doesn't work as expected
#1682
Labels
bug
Issue described a bug
difficulty easy
Easy issue: required small fix
good first issue
Issue for new contributors (not required gensim understanding + very simple)
Description
Using
datatype=np.float64
in aKeyedVectors.load_word2vec_call
doesn't work as expected, the loaded floats seem to lose precision. The datatype forsyn0
is stillfloat64
though, so it seems that they are cast to float32 first while loading, then cast to float64 when creating the array.Steps/Code/Corpus to Reproduce
Using this file -
test.kv.txt
Expected Results
Actual Results
Looking at the code and making a quick hack here, changing..
to..
..leads to the correct result. However, I imagine there are other cases to be covered as well.
The text was updated successfully, but these errors were encountered: