From 2060935cdbb5baf77399248e3eaffc1eee03b4fa Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 24 Jul 2015 04:54:13 +0200 Subject: [PATCH] * Remove explicit bytes type in doc.from_bytes, to accept bytearray --- spacy/tokens/doc.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index 771d93804..fffc27d90 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -298,7 +298,7 @@ cdef class Doc: byte_string = self.vocab.serializer.pack(self) return struct.pack('I', len(byte_string)) + byte_string - def from_bytes(self, bytes data): + def from_bytes(self, data): self.vocab.serializer.unpack_into(data[4:], self) return self