glove-python
glove-python copied to clipboard
python 3 incompatibility in glove.py
In line 166 and 167
word_ids = np.array(cooccurrence.keys(), dtype=np.int32)
values = np.array(cooccurrence.values(), dtype=np.float64)
gives
TypeError: int() argument must be a string, a bytes-like object or a number, not 'dict_keys'
Changing them to the following solved the issue:
word_ids = np.array(list(cooccurrence.keys()), dtype=np.int32)
values = np.array(list(cooccurrence.values()), dtype=np.float64)