From aa64031751db9c358d5dc93ac2f112eaefd71829 Mon Sep 17 00:00:00 2001 From: Explosion Bot Date: Mon, 30 Oct 2017 16:09:04 +0100 Subject: [PATCH] Fix clear_vectors() method on Vocab --- spacy/vocab.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index 937d4b69d..160f0d5bd 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -239,13 +239,13 @@ cdef class Vocab: def vectors_length(self): return self.vectors.data.shape[1] - def clear_vectors(self, new_dim=None): + def clear_vectors(self, width=None): """Drop the current vector table. Because all vectors must be the same width, you have to call this to change the size of the vectors. """ - if new_dim is None: - new_dim = self.vectors.data.shape[1] - self.vectors = Vectors(self.strings, width=new_dim) + if width is None: + width = self.vectors.data.shape[1] + self.vectors = Vectors(self.strings, width=width) def get_vector(self, orth): """Retrieve a vector for a word in the vocabulary. Words can be looked