baseband.base.utils.byte_array(pattern)[source] [edit on github]

Convert the pattern to a byte array.

pattern~numpy.ndarray, bytes, int, or iterable of int

Pattern to convert. If a ndarray or bytes instance, a byte array view is taken. If an (iterable of) int, the integers need to be unsigned 32 bit and will be interpreted as little-endian.

byte_arrayndarray of byte

With any elements of pattern stored in little-endian order.