summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py1
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