diff --git a/boltons/mathutils.py b/boltons/mathutils.py index 74123eb..eb5a4b1 100644 --- a/boltons/mathutils.py +++ b/boltons/mathutils.py @@ -23,6 +23,8 @@ def clamp(x, lower=float('-inf'), upper=float('inf')): 0 >>> clamp(101.0, 0, 5) 5 + >>> clamp(123, upper=5) + 5 Similar to `numpy's clip`_ function.