Pass vectors name correctly in prune_vectors

This commit is contained in:
Ines Montani 2019-09-16 15:16:29 +02:00
parent 3ba5238282
commit cb6c68a573
1 changed files with 1 additions and 1 deletions

View File

@ -318,7 +318,7 @@ cdef class Vocab:
keys = xp.asarray([key for (prob, i, key) in priority], dtype="uint64")
keep = xp.ascontiguousarray(self.vectors.data[indices[:nr_row]])
toss = xp.ascontiguousarray(self.vectors.data[indices[nr_row:]])
self.vectors = Vectors(data=keep, keys=keys)
self.vectors = Vectors(data=keep, keys=keys, name=self.vectors.name)
syn_keys, syn_rows, scores = self.vectors.most_similar(toss, batch_size=batch_size)
remap = {}
for i, key in enumerate(keys[nr_row:]):