euddraft icon indicating copy to clipboard operation
euddraft copied to clipboard

Importing numpy raises TypeError: add_docstring() argument 2 must be str, not None

Open armoha opened this issue 2 years ago • 0 comments

Current workaround

There is an open issue at numpy talking about the import error with numpy:
    https://github.com/numpy/numpy/issues/13248

--- numpy-1.23.4/numpy/core/overrides.py.orig	2019-05-27 12:41:06.000000000 +0200
+++ numpy-1.23.4/numpy/core/overrides.py	2019-10-13 18:51:06.387037239 +0200
@@ -140,6 +140,8 @@ def array_function_dispatch(dispatcher,
     -------
     Function suitable for decorating the implementation of a NumPy function.
     """
+    if dispatcher.__doc__ is None:
+        dispatcher.__doc__ = ""
     if not ARRAY_FUNCTION_ENABLED:
         def decorator(implementation):

armoha avatar Oct 21 '22 04:10 armoha