summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorLeoMao <LMao20001@gmail.com>2014-03-12 11:28:22 +0800
committerLeoMao <LMao20001@gmail.com>2014-03-12 11:28:22 +0800
commit42d6a74e1715930a09fc9f5053fc381d4c9cce45 (patch)
tree4086b2bc90920f712b88cc7a6eeee88426152b99 /numpy/lib/tests/test_function_base.py
parent3d419a1537446fab061d2774bdedf1e634a0ef31 (diff)
downloadnumpy-42d6a74e1715930a09fc9f5053fc381d4c9cce45.tar.gz
remove assert in _get_ufunc_and_otypes, add a test in test_function_base.py
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py6
1 files changed, 6 insertions, 0 deletions
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):