We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ee6a32 commit cebd52aCopy full SHA for cebd52a
numpy/_core/code_generators/generate_ufunc_api.py
@@ -38,6 +38,7 @@
38
static inline int
39
_import_umath(void)
40
{
41
+ PyObject *c_api;
42
PyObject *numpy = PyImport_ImportModule("numpy._core._multiarray_umath");
43
if (numpy == NULL && PyErr_ExceptionMatches(PyExc_ModuleNotFoundError)) {
44
PyErr_Clear();
@@ -50,7 +51,7 @@
50
51
return -1;
52
}
53
- PyObject *c_api = PyObject_GetAttrString(numpy, "_UFUNC_API");
54
+ c_api = PyObject_GetAttrString(numpy, "_UFUNC_API");
55
Py_DECREF(numpy);
56
if (c_api == NULL) {
57
PyErr_SetString(PyExc_AttributeError, "_UFUNC_API not found");
0 commit comments