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

Function clamp

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

Source from the content-addressed store, hash-verified

125
126
127def clamp(value: float, lower: float = 0.0, upper: float = 1.0) -> float:
128 return max(lower, min(upper, value))
129
130
131def safe_float(value: Any, default: float = 0.0) -> float:

Callers 8

scaled_similarityFunction · 0.70
multifacet_similarityFunction · 0.70
profile_entity_scoreFunction · 0.70
history_entity_scoreFunction · 0.70
metadata_signal_scoreFunction · 0.70
entity_density_scoreFunction · 0.70
score_rowFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected