only write the first byte -- probably no different but clearer

This commit is contained in:
Jan Petykiewicz 2020-05-19 00:17:31 -07:00
parent 73310fe993
commit f15499030d

View File

@ -156,7 +156,7 @@ if _USE_NUMPY:
"""
if len(bits) != 8:
raise InvalidDataError('write_bool_byte received {} bits, requires 8'.format(len(bits)))
return stream.write(numpy.packbits(bits))
return stream.write(numpy.packbits(bits)[0])
else:
def read_bool_byte(stream: io.BufferedIOBase) -> List[bool]:
"""