commpy.utilities.dec2bitarray¶
-
dec2bitarray
(in_number, bit_width)¶ Converts a positive integer to NumPy array of the specified size containing bits (0 and 1).
Parameters: - in_number (int) – Positive integer to be converted to a bit array.
- bit_width (int) – Size of the output bit array.
Returns: bitarray – Array containing the binary representation of the input decimal.
Return type: 1D ndarray of ints