Skip to content

Commit c0d838f

Browse files
Russell StewartRussell Stewart
authored andcommitted
Fixed distance copy bug in python evaluation.
1 parent 4f3156d commit c0d838f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eval/python/distance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def distance(W, vocab, ivocab, input_term):
3939
if term in vocab:
4040
print('Word: %s Position in vocabulary: %i' % (term, vocab[term]))
4141
if idx == 0:
42-
vec_result = W[vocab[term], :]
42+
vec_result = np.copy(W[vocab[term], :])
4343
else:
4444
vec_result += W[vocab[term], :]
4545
else:

0 commit comments

Comments
 (0)