MCPcopy Create free account
hub / github.com/IBM/AssetOpsBench / _safe_float

Function _safe_float

src/evaluation/report.py:17–22  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

15
16
17def _safe_float(value: Any) -> float | None:
18 if isinstance(value, bool):
19 return None
20 if isinstance(value, (int, float)):
21 return float(value)
22 return None
23
24
25def _avg(values: list[float]) -> float | None:

Callers 1

_aggregate_score_summaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected