Clip¶
- Clip(x, a, b)¶
Clip a value on a given interval.
This function can be useful when we want to ensure that a given number is in a given interval.
- Parameters:
- xfloat
Value to clip
- afloat
Lower bound of the interval
- bfloat
Upper bound of the interval
- Returns:
- clipfloat
Clipped value.
Examples
>>> import openturns as ot >>> p = ot.SpecFunc.Clip(0.7, 1.5, 2.5)
OpenTURNS