8000 Merge pull request #9985 from ziyan/skipcapiforignore · numpy/numpy@3d0c041 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3d0c041

Browse files
authored
Merge pull request #9985 from ziyan/skipcapiforignore
ENH: skip NPY_ALLOW_C_API for UFUNC_ERR_IGNORE
2 parents a2228e9 + bbf8011 commit 3d0c041

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

numpy/core/src/umath/extobj.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ _error_handler(int method, PyObject *errobj, char *errtype, int retstatus, int *
7676

7777
NPY_ALLOW_C_API_DEF
7878

79+
/* don't need C API for a simple ignore */
80+
if (method == UFUNC_ERR_IGNORE) {
81+
return 0;
82+
}
83+
7984
/* don't need C API for a simple print */
8085
if (method == UFUNC_ERR_PRINT) {
8186
if (*first) {

0 commit comments

Comments
 (0)
0