diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-10-21 14:55:13 -0700 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-10-21 14:55:13 -0700 |
commit | 4729550aa44c97b11d4c9bd39af9bc093c2ce0f8 (patch) | |
tree | b2aeb9a17ac4c5feed9558c14fc4589cddd7a8f4 /numpy/lib/function_base.py | |
parent | 4712875840b5413a47bd8dcbed9bedeaefe829cd (diff) | |
download | numpy-4729550aa44c97b11d4c9bd39af9bc093c2ce0f8.tar.gz |
DOC: piecewise callables take 1d arrays
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 573516f3e..0f221fe05 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1258,8 +1258,8 @@ def piecewise(x, condlist, funclist, *args, **kw): is the default value, used wherever all conditions are false. funclist : list of callables, f(x,*args,**kw), or scalars Each function is evaluated over `x` wherever its corresponding - condition is True. It should take an array as input and give an array - or a scalar value as output. If, instead of a callable, + condition is True. It should take a 1d array as input and give an 1d + array or a scalar value as output. If, instead of a callable, a scalar is provided then a constant function (``lambda x: scalar``) is assumed. args : tuple, optional |