testing needed for f2py with char/string arrays

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

testing needed for f2py with char/string arrays

Julian Taylor-3
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


_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion

signature.asc (861 bytes) Download Attachment