mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 00:46:28 +03:00
* Remove explicit bytes type in doc.from_bytes, to accept bytearray
This commit is contained in:
parent
aa28e2e01d
commit
2060935cdb
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user