summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorMatteo Raso <matteo_luigi_raso@protonmail.com>2023-01-18 02:25:00 -0500
committerMatteo Raso <matteo_luigi_raso@protonmail.com>2023-01-18 02:25:00 -0500
commit88cdaa21aea87ec7d56d1d583500ab2659a5e65e (patch)
treefef694437f5e163d7a06c56c39719fe811f643c2 /numpy/lib/tests/test_function_base.py
parent68d7aadd30cb7a4f6f32e76715b38b644df18602 (diff)
downloadnumpy-88cdaa21aea87ec7d56d1d583500ab2659a5e65e.tar.gz
BUG: Added __name__ atribute to vectorize class (#23021)
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py7
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 ecba35f2d..69e4c4848 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -1780,6 +1780,13 @@ class TestVectorize:
assert_equal(type(r), subclass)
assert_equal(r, m * v)
+ def test_name(self):
+ #See gh-23021
+ @np.vectorize
+ def f2(a, b):
+ return a + b
+
+ assert f2.__name__ == 'f2'
class TestLeaks:
class A: