summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/multiarray.py4
-rw-r--r--numpy/core/src/umath/umathmodule.c12
2 files changed, 5 insertions, 11 deletions
diff --git a/numpy/core/multiarray.py b/numpy/core/multiarray.py
index 77e59c70c..c1db75864 100644
--- a/numpy/core/multiarray.py
+++ b/numpy/core/multiarray.py
@@ -1,14 +1,14 @@
from . import _multiarray_umath
from numpy.core._multiarray_umath import *
from numpy.core._multiarray_umath import (_fastCopyAndTranspose, _flagdict, _insert,
- _reconstruct, _vec_string, _ARRAY_API)
+ _reconstruct, _vec_string, _ARRAY_API, _monotonicity)
__all__ = ['_ARRAY_API', 'ALLOW_THREADS', 'BUFSIZE', 'CLIP', 'DATETIMEUNITS',
'ITEM_HASOBJECT', 'ITEM_IS_POINTER', 'LIST_PICKLE', 'MAXDIMS',
'MAY_SHARE_BOUNDS', 'MAY_SHARE_EXACT', 'NEEDS_INIT', 'NEEDS_PYAPI',
'RAISE', 'USE_GETITEM', 'USE_SETITEM', 'WRAP',
'_fastCopyAndTranspose', '_flagdict', '_insert', '_reconstruct',
- '_vec_string',
+ '_vec_string', '_monotonicity',
'add_docstring', 'arange', 'array', 'bincount', 'broadcast', 'busday_count',
'busday_offset', 'busdaycalendar', 'can_cast', 'compare_chararrays',
'concatenate', 'copyto', 'correlate', 'correlate2', 'count_nonzero',
diff --git a/numpy/core/src/umath/umathmodule.c b/numpy/core/src/umath/umathmodule.c
index 945b11fe7..20bd2b0a8 100644
--- a/numpy/core/src/umath/umathmodule.c
+++ b/numpy/core/src/umath/umathmodule.c
@@ -331,16 +331,10 @@ int initumath(PyObject *m)
PyDict_SetItemString(d, "mod", s2);
if (!intern_strings()) {
- goto err;
+ PyErr_SetString(PyExc_RuntimeError,
+ "cannot intern umath strings while initializing _multiarray_umath.");
+ return -1;
}
return 0;
-
- err:
- /* Check for errors */
- if (!PyErr_Occurred()) {
- PyErr_SetString(PyExc_RuntimeError,
- "cannot load umath part of _multiarray_umath.");
- }
- return -1;
}