Skip to content

Commit 8c9e1b7

Browse files
author
shuming.chang
committed
numpy add_docstring runtime error workaround
1 parent 3801ec0 commit 8c9e1b7

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

pythonforandroid/recipes/numpy/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class NumpyRecipe(CompiledComponentsPythonRecipe):
1111
depends = ['setuptools', 'cython']
1212

1313
patches = [
14+
join('patches', 'add_docstring_workaround.patch'),
1415
join('patches', 'add_libm_explicitly_to_build.patch'),
1516
join('patches', 'do_not_use_system_libs.patch'),
1617
join('patches', 'remove_unittest_call.patch'),
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/numpy/core/overrides.py b/numpy/core/overrides.py
2+
index 55c7bd1ea..7f464c92a 100644
3+
--- a/numpy/core/overrides.py
4+
+++ b/numpy/core/overrides.py
5+
@@ -154,6 +154,9 @@ def array_function_dispatch(dispatcher, module=None, verify=True,
6+
Function suitable for decorating the implementation of a NumPy function.
7+
"""
8+
9+
+ if dispatcher.__doc__ is None:
10+
+ dispatcher.__doc__ = ""
11+
+
12+
if not ARRAY_FUNCTION_ENABLED:
13+
def decorator(implementation):
14+
if docs_from_dispatcher:

0 commit comments

Comments
 (0)