MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / safe_float

Function safe_float

experiments/baselines/discourse_aware/runner.py:157–161  ·  view source on GitHub ↗
(value: Any, default: float = 0.0)

Source from the content-addressed store, hash-verified

155
156
157def safe_float(value: Any, default: float = 0.0) -> float:
158 try:
159 return float(value)
160 except (TypeError, ValueError):
161 return default
162
163
164def load_jsonl(path: Path) -> List[Dict[str, Any]]:

Callers 1

build_initial_profileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected