def mux(array, array_base=2):
    """Multiplex array containing digits of given base into base-10 int

    Args:
        array (numpy.ndarray): 1-d array of digits of base "base".
        base (int, optional): Base of digits in array. Defaults to 2.

    Returns:
        int: multiplexed number 
    """
    s = 0
    for i, digit in enumerate(array):
        exponent = len(array) - 1 - i
        s += digit * array_base ** exponent
    return s