deltakit.explorer.types.BinaryDataType#

class deltakit.explorer.types.BinaryDataType(data: Path | DataString | list[list[int]] | ndarray[tuple[Any, ...], dtype[_ScalarT]], data_format: DataFormat = DataFormat.B8, data_width: int = -1)#

Bases: object

Any binary table, stored in a file, datastring, or RAM.

Methods#

BinaryDataType.as_01_string

Represent content of the object as 01 string.

BinaryDataType.as_b8_bytes

Represent underlying data as b8 bit-packed bytes.

BinaryDataType.as_data_string

Converts the object to a compact datastring.

BinaryDataType.as_numpy

Represent the data as unsigned 1 byte/number (uint8) numpy table.

BinaryDataType.combine

Stack multiple binary tables into one using numpy representation.

BinaryDataType.split

Split a data file into multiple blocks based on the number of output files.

BinaryDataType.to_batches

Split a data file into batches of fixed size.