summaryrefslogtreecommitdiff
path: root/numpy/core/src/multiarray
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/src/multiarray')
-rw-r--r--numpy/core/src/multiarray/arraytypes.c.src12
1 files changed, 1 insertions, 11 deletions
diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src
index 2539fdb57..7cd80ba9a 100644
--- a/numpy/core/src/multiarray/arraytypes.c.src
+++ b/numpy/core/src/multiarray/arraytypes.c.src
@@ -394,19 +394,9 @@ static int
/* Overflow could have occured converting double to float */
if (NPY_UNLIKELY((npy_isinf(temp.real) && !npy_isinf(oop.real)) ||
(npy_isinf(temp.imag) && !npy_isinf(oop.imag)))) {
- int bufsize, errmask;
- PyObject *errobj;
-
- if (PyUFunc_GetPyValues("assignment", &bufsize, &errmask,
- &errobj) < 0) {
- return -1;
- }
- int first = 1;
- if (PyUFunc_handlefperr(errmask, errobj, NPY_FPE_OVERFLOW, &first)) {
- Py_XDECREF(errobj);
+ if (PyUFunc_GiveFloatingpointErrors("cast", NPY_FPE_OVERFLOW) < 0) {
return -1;
}
- Py_XDECREF(errobj);
}
#endif
}