def check_type_force_float(x, name):
    if type(x) is int:
        return float(x)
    elif not isinstance(x, (float, numpy.float64)):
        raise TypeError("%r should be a float" % (name,))
    else:
        return x
If an int is passed, convert it to a float. If some other type is passed,
dataset/ETHPy150Open probcomp/crosscat/src/tests/component_model_extensions/CyclicComponentModel.py/check_type_force_float