Skip to content

Commit

Permalink
fix lovit#137 contexts matrix dtype error
Browse files Browse the repository at this point in the history
sent_to_word_contexts_matrix 에서 dynamic_weight=False시
contexts_matrix가 long type이 되어 GloVe에 fit 시 에러 발생가능한 부분 수정
  • Loading branch information
mino-park7 authored Oct 31, 2021
1 parent 503eaee commit eba0d4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion soynlp/vectorizer/_word_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ def _encode_as_matrix(word2contexts, vocab2idx, verbose):
print(' - (word, context) matrix was constructed. shape = {}{}'.format(
x.shape, ' '*20))

return x
return x.astype(float)

0 comments on commit eba0d4a

Please sign in to comment.