[Numpy-discussion] testing needed for f2py with char/string arrays

Julian Taylor jtaylor.debian at googlemail.com
Sat Apr 15 12:32:44 EDT 2017


hi,
we need to deprecate the NPY_CHAR typenumber [0] in order to enable us
to add new core dtypes without adding ugly hacks to our ABI.
Technically the typenumber was deprecated way back in 1.6 when it
accidentally broke our ABI. But due to lack of time f2py never got
updated to actually follow through.
In order to unblock our dtype development cleanly we want to finally do
the deprecation properly.
As nobody really knows how f2py works and there are no existing unit
tests covering the char dtype the change is very likely to break something.
The change is available here:
https://github.com/numpy/numpy/pull/8948

It attempts to map the NPY_CHAR dtype to the equivalent NPY_STRING with
itemsize 1. I have only been able to come up with a test that covers one
of the changed places.
So if you have a f2py usecase that in some way involves passing arrays
of strings back and forth between python and fortran, please test that
branch or post a reproducable example here.

Thanks,
Julian

[0]
https://github.com/numpy/numpy/blob/master/numpy/core/include/numpy/ndarraytypes.h#L74

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 845 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20170415/b8d513f6/attachment.sig>


More information about the NumPy-Discussion mailing list