diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-03-12 08:16:57 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2014-03-12 08:16:57 -0600 |
commit | 424b56efe73c8a372cec61f4d5c22724ec1b4aab (patch) | |
tree | da362b1dc7426e5bee6cdb89fc82ccbc6365449c /numpy/lib/tests/test_function_base.py | |
parent | f82fe71457670ea6f5178fc86fc815c3daf6ad17 (diff) | |
parent | 42d6a74e1715930a09fc9f5053fc381d4c9cce45 (diff) | |
download | numpy-424b56efe73c8a372cec61f4d5c22724ec1b4aab.tar.gz |
Merge pull request #4479 from leomao/master
BUG: when initialize a vectorize object, always set self._ufunc to None first. fix #3285.
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 6 |
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): |