Skip to content

Commit

Permalink
Merge pull request #24958 from seberg/remove-silly-error-setting
Browse files Browse the repository at this point in the history
MAINT: Remove unhelpful error replacements from `import_array()`
  • Loading branch information
ngoldbaum committed Oct 20, 2023
2 parents acae28b + b2f0b23 commit d885b0b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions numpy/_core/code_generators/generate_numpy_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,12 @@
}
if (numpy == NULL) {
PyErr_SetString(PyExc_ImportError,
"_multiarray_umath failed to import");
return -1;
}
PyObject *c_api = PyObject_GetAttrString(numpy, "_ARRAY_API");
Py_DECREF(numpy);
if (c_api == NULL) {
PyErr_SetString(PyExc_AttributeError, "_ARRAY_API not found");
return -1;
}
Expand Down

0 comments on commit d885b0b

Please sign in to comment.