diff --git a/spacy/vectors.pyx b/spacy/vectors.pyx index 96a9d3435..079f6fc84 100644 --- a/spacy/vectors.pyx +++ b/spacy/vectors.pyx @@ -310,6 +310,8 @@ cdef class Vectors: self.data = xp.fromfile(file_, dtype=dtype) if dtype != 'float32': self.data = xp.ascontiguousarray(self.data, dtype='float32') + if self.data.ndim == 1: + self.data = self.data.reshape((self.data.size//width, width)) n = 0 strings = StringStore() with (path / 'vocab.txt').open('r') as file_: