diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2021-07-01 17:54:45 +0300 |
---|---|---|
committer | Rohit Goswami <rog32@hi.is> | 2022-06-05 15:19:12 +0000 |
commit | d4e11c7a2eb64861275facb076d47ccd135fa28c (patch) | |
tree | 307e937f15807094ae81b8a78d791bab4526c851 /numpy/f2py/tests/src/array_from_pyobj | |
parent | e5fcb9d52c1b9d3c9caf067849ad1bba128c7e17 (diff) | |
download | numpy-d4e11c7a2eb64861275facb076d47ccd135fa28c.tar.gz |
ENH: Support character string arrays
TST: added test for issue #18684
ENH: f2py opens files with correct encoding, fixes #635
TST: added test for issue #6308
TST: added test for issue #4519
TST: added test for issue #3425
ENH: Implement user-defined hooks support for post-processing f2py data structure. Implement character BC hook.
ENH: Add support for detecting utf-16 and utf-32 encodings.
Diffstat (limited to 'numpy/f2py/tests/src/array_from_pyobj')
-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; |