diff options
author | Matteo Raso <matteo_luigi_raso@protonmail.com> | 2023-03-31 19:24:10 -0400 |
---|---|---|
committer | Matteo Raso <matteo_luigi_raso@protonmail.com> | 2023-04-01 21:48:37 -0400 |
commit | d25018b84c2844a5eda2b3ab34ed7723bf71daba (patch) | |
tree | 902152f6f7a766a3ee8c742807a54a8760a2682f /numpy/lib/function_base.py | |
parent | dfaa72d72453b8738ec711180e03da824651e46b (diff) | |
download | numpy-d25018b84c2844a5eda2b3ab34ed7723bf71daba.tar.gz |
Fixed edge case where pyfunc has no attribute `__doc__`
[skip circle] [skip azp] [skip cirrus]
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index b9f0d58d2..90caac062 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -2303,7 +2303,7 @@ class vectorize: self._ufunc = {} # Caching to improve default performance self._doc = None self.__doc__ = doc - if doc is None: + if doc is None and hasattr(pyfunc, '__doc__'): self.__doc__ = pyfunc.__doc__ else: self._doc = doc |