From 4bae3f55894e78ec6326d6dba8ac7e3eb39440aa Mon Sep 17 00:00:00 2001 From: tiwo Date: Sun, 18 Jun 2017 14:55:14 +0200 Subject: [PATCH] fix default arguments of mathutitls.clamp --- boltons/mathutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boltons/mathutils.py b/boltons/mathutils.py index 4dcfc5c..74123eb 100644 --- a/boltons/mathutils.py +++ b/boltons/mathutils.py @@ -5,7 +5,7 @@ from math import ceil as _ceil, floor as _floor import bisect -def clamp(x, lower=None, upper=None): +def clamp(x, lower=float('-inf'), upper=float('inf')): """Limit a value to a given range. Args: