From 5b329acbf2285bbba32249c187b5888e1fadf09c Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 22 Aug 2017 19:00:27 +0200 Subject: [PATCH] Fix vectors_length property in vocab --- spacy/vocab.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index dc141552d..f65c81da1 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -244,7 +244,7 @@ cdef class Vocab: @property def vectors_length(self): - return len(self.vectors) + return self.vectors.data.shape[0] def clear_vectors(self, new_dim=None): """Drop the current vector table. Because all vectors must be the same