Python function
upper_bounded_default
upper_bounded_default()β
max.pipelines.upper_bounded_default(upper_bound, default)
Returns a value not exceeding the upper bound.
Given an upper bound and an optional default value, returns the default if it is within bound, otherwise the upper bound (or raises if default exceeds the bound).
-
Parameters:
-
Raises:
-
ValueError β If the provided default value exceeds the upper bound.
-
Returns:
-
The final value.
-
Return type:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!