Skip to content

Commit

Permalink
Merge pull request #22216 from charris/backport-22189
Browse files Browse the repository at this point in the history
MAINT: fix an incorrect pointer type usage in f2py
  • Loading branch information
charris committed Sep 6, 2022
2 parents 499ad3b + 5286e57 commit cb715c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions numpy/f2py/cfuncs.py
Expand Up @@ -1116,12 +1116,12 @@
return 1;
}
if (PyArray_CheckScalar(obj)) { /* 0-dim array or still array scalar */
PyObject *arr;
PyArrayObject *arr;
if (PyArray_Check(obj)) {
arr = PyArray_Cast((PyArrayObject *)obj, NPY_CDOUBLE);
arr = (PyArrayObject *)PyArray_Cast((PyArrayObject *)obj, NPY_CDOUBLE);
}
else {
arr = PyArray_FromScalar(obj, PyArray_DescrFromType(NPY_CDOUBLE));
arr = (PyArrayObject *)PyArray_FromScalar(obj, PyArray_DescrFromType(NPY_CDOUBLE));
}
if (arr == NULL) {
return 0;
Expand Down

0 comments on commit cb715c7

Please sign in to comment.