[Numpy-discussion] Fixing PyArray_Descr flags member size, ABI vs pickling issue

David Cournapeau cournape@gmail....
Mon Mar 5 21:53:05 CST 2012


Hi,

This is following the discussion on bug
http://projects.scipy.org/numpy/ticket/2017

Essentially, there is a discrepency between the actual type of the
flags member in the dtype C structure (char) and how it is declared in
the descriptor table (T_INT). The problem is that we are damned if we
fix it, damned if we are not:
  - fixing T_INT to T_BYTE. flag in python is now fixed, but it breaks
pickled numpy arrays
  - not fixing it means that the value is broken at the python level.
Changing the flag to be an actual int would break the ABI.

I currently have this: https://github.com/numpy/numpy/pull/228

Which one is the more appropriate ? Maybe a deprecation warning for
1.7 and change it in 1.8 ?

Note that we can fix the hash issue with either solution,

David


More information about the NumPy-Discussion mailing list