-
sdr.unpack(x: ArrayLike, bpe: int, dtype: DTypeLike | None =
None
) NDArray[int_] Unpacks an array with multiple bits per element into a binary array.
The data is assumed to have the most significant bit first.
Examples
In [1]: sdr.unpack([2, 0, 3, 1], 2) Out[1]: array([1, 0, 0, 0, 1, 1, 0, 1], dtype=uint8) In [2]: sdr.unpack([4, 3, 2], 3) Out[2]: array([1, 0, 0, 0, 1, 1, 0, 1, 0], dtype=uint8)