summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-02-03 19:08:44 -0700
committerGitHub <noreply@github.com>2018-02-03 19:08:44 -0700
commitffe8d7e0f55b814a63840507d932d8b58c601c91 (patch)
tree68958957de496873b23c7e31d4327068545e2dc5 /numpy/core/src
parent7210768d8da23cea34c2f2cf05cdfb8837542e3c (diff)
parent477bbc0b90fd41909cc2c14dfcbd5cf8ece902e6 (diff)
downloadnumpy-ffe8d7e0f55b814a63840507d932d8b58c601c91.tar.gz
Merge pull request #10516 from eric-wieser/generate_umath-error-handle
MAINT: Allow errors to escape from InitOperators
Diffstat (limited to 'numpy/core/src')
-rw-r--r--numpy/core/src/umath/umathmodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/core/src/umath/umathmodule.c b/numpy/core/src/umath/umathmodule.c
index 1a6cee030..397c2f760 100644
--- a/numpy/core/src/umath/umathmodule.c
+++ b/numpy/core/src/umath/umathmodule.c
@@ -364,7 +364,9 @@ PyMODINIT_FUNC initumath(void)
Py_DECREF(s);
/* Load the ufunc operators into the array module's namespace */
- InitOperators(d);
+ if (InitOperators(d) < 0) {
+ goto err;
+ }
PyDict_SetItemString(d, "pi", s = PyFloat_FromDouble(NPY_PI));
Py_DECREF(s);