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/tests/test_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/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 696d9bc85..5d0f8aa45 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -499,6 +499,13 @@ class TestSinc(TestCase): #check symmetry assert_array_almost_equal(w, flipud(w), 7) + def test_array_like(self): + x = [0, 0.5] + y1 = sinc(array(x)) + y2 = sinc(list(x)) + y3 = sinc(tuple(x)) + assert_array_equal(y1, y2) + assert_array_equal(y1, y3) class TestHistogram(TestCase): def setUp(self): |