def valideFloat(values, length):
    """This function takes a single float, or int or a list of them and a
    requested length and returns a list of float of length 1 or length."""
    if type(values) == float:
        return [values]
    elif type(values) == int:
        return [float(values)]
    else:
        if len(values) == 1:
            return [float(values[0])]
        else:
            assert len(values) == length
            return [float(v) for v in values]