diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2017-04-14 21:00:29 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2017-05-02 22:03:29 +0200 |
commit | a618b4e10dde4b41acceac3d8f7c042fb88af1a7 (patch) | |
tree | e439e34fab885df68305affa43602ddbe4284155 /numpy/f2py/cfuncs.py | |
parent | b8d0498eb1463e900a6c07311c0c1f80f5611bad (diff) | |
download | numpy-a618b4e10dde4b41acceac3d8f7c042fb88af1a7.tar.gz |
MAINT: remove usage of NPY_CHAR from f2py
Diffstat (limited to 'numpy/f2py/cfuncs.py')
-rw-r--r-- | numpy/f2py/cfuncs.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py index 0d0a52764..1632a0d47 100644 --- a/numpy/f2py/cfuncs.py +++ b/numpy/f2py/cfuncs.py @@ -1153,8 +1153,9 @@ def buildcfuncs(): m] = '#define %s(v) (PyArray_SimpleNewFromData(0,NULL,%s,(char *)v))' % (m, c2capi_map[k]) k = 'string' m = 'pyarr_from_p_%s1' % k + # NPY_CHAR compatibility, NPY_STRING with itemsize 1 cppmacros[ - m] = '#define %s(v,dims) (PyArray_SimpleNewFromData(1,dims,NPY_CHAR,(char *)v))' % (m) + m] = '#define %s(v,dims) (PyArray_New(&PyArray_Type, 1, dims, NPY_STRING, NULL, v, 1, NPY_ARRAY_CARRAY, NULL))' % (m) ############ Auxiliary functions for sorting needs ################### |