From 42d6a74e1715930a09fc9f5053fc381d4c9cce45 Mon Sep 17 00:00:00 2001 From: LeoMao Date: Wed, 12 Mar 2014 11:28:22 +0800 Subject: remove assert in _get_ufunc_and_otypes, add a test in test_function_base.py --- numpy/lib/tests/test_function_base.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'numpy/lib/tests/test_function_base.py') diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index 3e102cf6a..6c11b0385 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -721,6 +721,12 @@ class TestVectorize(TestCase): assert_array_equal(f(x), x*x) assert_equal(_calls[0], len(x)) + def test_otypes(self): + f = np.vectorize(lambda x: x) + f.otypes = 'i' + x = np.arange(5) + assert_array_equal(f(x), x) + class TestDigitize(TestCase): def test_forward(self): -- cgit v1.2.1