File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
numpy/_core/code_generators Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 65
65
{
66
66
int st;
67
67
PyObject *numpy = PyImport_ImportModule("numpy._core._multiarray_umath");
68
+ PyObject *c_api;
68
69
if (numpy == NULL && PyErr_ExceptionMatches(PyExc_ModuleNotFoundError)) {
69
70
PyErr_Clear();
70
71
numpy = PyImport_ImportModule("numpy.core._multiarray_umath");
74
75
return -1;
75
76
}
76
77
77
- PyObject * c_api = PyObject_GetAttrString(numpy, "_ARRAY_API");
78
+ c_api = PyObject_GetAttrString(numpy, "_ARRAY_API");
78
79
Py_DECREF(numpy);
79
80
if (c_api == NULL) {
80
81
return -1;
Original file line number Diff line number Diff line change 38
38
static inline int
39
39
_import_umath(void)
40
40
{
41
+ PyObject *c_api;
41
42
PyObject *numpy = PyImport_ImportModule("numpy._core._multiarray_umath");
42
43
if (numpy == NULL && PyErr_ExceptionMatches(PyExc_ModuleNotFoundError)) {
43
44
PyErr_Clear();
50
51
return -1;
51
52
}
52
53
53
- PyObject * c_api = PyObject_GetAttrString(numpy, "_UFUNC_API");
54
+ c_api = PyObject_GetAttrString(numpy, "_UFUNC_API");
54
55
Py_DECREF(numpy);
55
56
if (c_api == NULL) {
56
57
PyErr_SetString(PyExc_AttributeError, "_UFUNC_API not found");
You can’t perform that action at this time.
0 commit comments