From e91f1441f69ea87bc64bec82cfac75eb06282ac3 Mon Sep 17 00:00:00 2001 From: Bharat Raghunathan Date: Wed, 18 Dec 2019 08:31:21 +0530 Subject: DOC: Update documentation of np.clip --- numpy/core/fromnumeric.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy/core/fromnumeric.py') diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index f09f2a465..9f55e104c 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -2033,7 +2033,8 @@ def clip(a, a_min, a_max, out=None, **kwargs): is specified, values smaller than 0 become 0, and values larger than 1 become 1. - Equivalent to but faster than ``np.maximum(a_min, np.minimum(a, a_max))``. + Equivalent to but faster than ``np.maximum(a_min, np.minimum(a, a_max))`` + only if ``a_min < a_max`` else returns ``a_max``. No check is performed to ensure ``a_min < a_max``. Parameters -- cgit v1.2.1 From 09cd87ca17004651866fce1849357f15a7ac2230 Mon Sep 17 00:00:00 2001 From: Bharat Raghunathan Date: Wed, 18 Dec 2019 18:22:19 +0530 Subject: Doc changes per review --- numpy/core/fromnumeric.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/fromnumeric.py') diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 9f55e104c..33b3b5703 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -2034,7 +2034,7 @@ def clip(a, a_min, a_max, out=None, **kwargs): than 1 become 1. Equivalent to but faster than ``np.maximum(a_min, np.minimum(a, a_max))`` - only if ``a_min < a_max`` else returns ``a_max``. + assuming ``a_min < a_max``. No check is performed to ensure ``a_min < a_max``. Parameters -- cgit v1.2.1