deltakit.core.data_formats.to_bytearray#

deltakit.core.data_formats.to_bytearray(data: Path | bytes) bytearray#

Converts either the content of a file or a bytes object to a bytearray object. A key motivation for this is that np.unpackbits accepts bytearray but not bytes.