diff options
| author | Melissa Weber Mendonça <melissawm.github@gmail.com> | 2022-06-06 12:46:27 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-06 12:46:27 -0300 |
| commit | aeb2b21670e6071467db1aa237fb2772616787e0 (patch) | |
| tree | 290d864bdfca6d0eef257c6894117d677036c573 /numpy/f2py/tests/src | |
| parent | c3e5246df67e231d4549952fc8b5c1333a5e7ff7 (diff) | |
| parent | 5c0ecb52890f92d43cf70519cd5491b8415b3710 (diff) | |
| download | numpy-aeb2b21670e6071467db1aa237fb2772616787e0.tar.gz | |
Merge pull request #19388 from pearu/enh-f2py-character-support
Co-authored-by: Rohit Goswami <rog32@hi.is>
Diffstat (limited to 'numpy/f2py/tests/src')
| -rw-r--r-- | numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c b/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c index c8ae7b9dc..9a8b4a752 100644 --- a/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c +++ b/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c @@ -33,6 +33,7 @@ static PyObject *f2py_rout_wrap_call(PyObject *capi_self, PyObject *capi_args) { PyObject * volatile capi_buildvalue = NULL; int type_num = 0; + int elsize = 0; npy_intp *dims = NULL; PyObject *dims_capi = Py_None; int rank = 0; @@ -41,8 +42,8 @@ static PyObject *f2py_rout_wrap_call(PyObject *capi_self, PyObject *arr_capi = Py_None; int i; - if (!PyArg_ParseTuple(capi_args,"iOiO|:wrap.call",\ - &type_num,&dims_capi,&intent,&arr_capi)) + if (!PyArg_ParseTuple(capi_args,"iiOiO|:wrap.call",\ + &type_num,&elsize,&dims_capi,&intent,&arr_capi)) return NULL; rank = PySequence_Length(dims_capi); dims = malloc(rank*sizeof(npy_intp)); @@ -58,7 +59,7 @@ static PyObject *f2py_rout_wrap_call(PyObject *capi_self, goto fail; } } - capi_arr_tmp = array_from_pyobj(type_num,dims,rank,intent|F2PY_INTENT_OUT,arr_capi); + capi_arr_tmp = ndarray_from_pyobj(type_num,elsize,dims,rank,intent|F2PY_INTENT_OUT,arr_capi,"wrap.call failed"); if (capi_arr_tmp == NULL) { free(dims); return NULL; |
