komm.unpack
Unpacks a given integer array. Unpacks a given integer array by converting each integer to its bit array representation, using the specified width
for each group, and concatenating the results.
Parameters:
-
bit_array
(Iterable[int]
) –The input integer array.
-
width
(int
) –The width of each group.
Returns:
-
unpacked
(Array1D[int]
) –The unpacked bit array.
Examples:
>>> komm.unpack([16, 26], width=5)
array([0, 0, 0, 0, 1, 0, 1, 0, 1, 1])
>>> komm.unpack([16, 26], width=8)
array([0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0])