def isclose(a, b, rel_tol = 1e-8):
    if not isinstance(a, (int, float)) or not isinstance(b, (int, float)):
        return False

    diff = abs(a - b)
    return (diff <= abs(rel_tol * a) and
            diff <= abs(rel_tol * b))
dataset/ETHPy150Open jmathai/elodie/elodie/tests/helper.py/isclose/original