MCPcopy Index your code
hub / github.com/algorithmicsuperintelligence/openevolve / check_json_float

Function check_json_float

scripts/visualizer.py:100–101  ·  view source on GitHub ↗
(v: Optional[float])

Source from the content-addressed store, hash-verified

98 program["metadata"]["parent_metrics"][k] = None
99
100def check_json_float(v: Optional[float]) -> bool:
101 return isinstance(v, Number) and not (math.isinf(v) or math.isnan(v))
102
103
104@app.route("/")

Calls

no outgoing calls

Tested by 8

test_valid_zeroMethod · 0.72
test_valid_integerMethod · 0.72
test_invalid_nanMethod · 0.72
test_invalid_noneMethod · 0.72