From 91de0cb2983d08bda38f8e4b0d5998a6c588c87e Mon Sep 17 00:00:00 2001 From: tiwo Date: Sun, 18 Jun 2017 15:09:48 +0200 Subject: [PATCH] add an example using default arguments of clamp --- boltons/mathutils.py | 2 ++ 1 file changed, 2 insertions(+) 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.