comnum.unpack_symbols#
- comnum.unpack_symbols(symbols, m)#
Unpack symbols of
mbits into bits, the most significant first.- Parameters:
symbols (array_like) – the symbols, below
2^m.m (int) – bits per symbol, 1 to 16.
- Returns:
mbits per symbol (uint8).- Return type:
- Raises:
ValueError – for an input that is not an array of numbers of the expected shape.
Examples
>>> import comnum >>> comnum.unpack_symbols([11, 12], 4).tolist() [1, 0, 1, 1, 1, 1, 0, 0]