diff options
| author | Eric Wieser <wieser.eric@gmail.com> | 2018-02-03 11:07:34 -0800 |
|---|---|---|
| committer | Eric Wieser <wieser.eric@gmail.com> | 2018-02-03 11:13:22 -0800 |
| commit | 477bbc0b90fd41909cc2c14dfcbd5cf8ece902e6 (patch) | |
| tree | 25597ded9f9683dae191bb7b7a7e2d40caa36b15 /numpy/core/src | |
| parent | e3c74333eaf51bf8002d5bccfc97bd3fe8863e5c (diff) | |
| download | numpy-477bbc0b90fd41909cc2c14dfcbd5cf8ece902e6.tar.gz | |
MAINT: Allow errors to escape from InitOperators
Diffstat (limited to 'numpy/core/src')
| -rw-r--r-- | numpy/core/src/umath/umathmodule.c | 4 |
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); |
