diff options
author | Pauli Virtanen <pav@iki.fi> | 2010-06-27 11:07:15 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2010-06-27 11:07:15 +0000 |
commit | 9b86617974fee246df0ebba859102897f531f659 (patch) | |
tree | 95be01629a533b72bb4badddde287697c5a1ddab /numpy/lib/function_base.py | |
parent | 6d438e6d3e274ea6b167939d0d0abfad7b3701b9 (diff) | |
download | numpy-9b86617974fee246df0ebba859102897f531f659.tar.gz |
BUG: lib: fix sinc to handle array-like inputs properly (fixes #1523)
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 1a93b5a1d..03a4ef0b6 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -2737,6 +2737,7 @@ def sinc(x): <matplotlib.image.AxesImage object at 0x...> """ + x = np.asanyarray(x) y = pi* where(x == 0, 1.0e-20, x) return sin(y)/y |