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

Function clamp

experiments/baselines/scholar_inbox/runner.py:62–63  ·  view source on GitHub ↗
(value: float, lower: float = 0.0, upper: float = 1.0)

Source from the content-addressed store, hash-verified

60
61
62def clamp(value: float, lower: float = 0.0, upper: float = 1.0) -> float:
63 return max(lower, min(upper, value))
64
65
66def safe_float(value: Any, default: float = 0.0) -> float:

Callers 4

scaled_similarityFunction · 0.70
keyword_match_scoreFunction · 0.70
content_scoreFunction · 0.70
score_rowFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected