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

Function safe_div

experiments/benchmark/evaluate_simulation_metrics.py:103–106  ·  view source on GitHub ↗
(numerator: float, denominator: float)

Source from the content-addressed store, hash-verified

101
102
103def safe_div(numerator: float, denominator: float) -> float:
104 if denominator <= 0:
105 return 0.0
106 return numerator / denominator
107
108
109def mean(values: List[float]) -> float:

Callers 3

evaluate_episodeFunction · 0.70
aggregate_metricsFunction · 0.70
build_dataset_summaryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected