def convert_binary_to_float(binary_repr, weight_range=(-1, 1)):
    """ Convert a binary array into a decimal number in some range

    Parameters
    ----------
    binary_repr: list
        binary representation of the number
    weight_range: tuple
        range to which the number should be mapped
    
    Return
    ------
    float decimal number corresponding to the mapping of binary_repr 

    """
    int_repr = int("".join(str(b) for b in binary_repr), 2)
    total_range = weight_range[1] - weight_range[0]
    smallest_representable_decimal = total_range / (2**len(binary_repr) - 1)
    return weight_range[0] + int_repr * smallest_representable_decimal