expyfun.decimals_to_binary#
- expyfun.decimals_to_binary(decimals, n_bits)[source]#
Convert a sequence of decimal numbers to a sequence of binary numbers.
- Parameters:
- decimalsarray-like
Array of integers to convert. Must all be >= 0.
- n_bitsarray-like
Array of the number of bits to use to represent each decimal number.
- Returns:
- binarylist
Binary representation.
Notes
This function is useful for generating IDs to be stamped using the TDT.