

def check_type_force_float(x, name):
    '\n    If an int is passed, convert it to a float. If some other type is passed,\n    raise an exception.\n    '
    if (type(x) is int):
        return float(x)
    elif (not isinstance(name, (float, numpy.float64))):
        raise TypeError(('%r should be a float' % (name,)))
    else:
        return x

dataset/ETHPy150Open probcomp/crosscat/src/tests/component_model_extensions/CyclicComponentModel.py check_type_force_float/VarMisuse@38/90 `x`->`name`