deltakit.core.decoding_graphs.Bitstring.from_bytes#

classmethod Bitstring.from_bytes(bytes_: Collection[SupportsIndex]) Self#

Create a bitstring from a collection of bytes. For example, a numpy array of uint8s. Assumed to be in little endian form.

>>> Bitstring.from_bytes(np.array([2, 128], dtype=np.uint8))
0b1000000000000010