The dtype object seems to be shared after a copy of a structured array is done. This is inconvenient when you change properties in one of arrays and these are propagated to the other.
In [21]: dt = np.dtype('f4,f8')
In [22]: ra = np.empty(1, dt)
In [23]: ra.dtype
Out[23]: dtype([('f0', '<f4'), ('f1', '<f8')])
In [24]: rb = ra[:]
In [25]: ra.dtype.names = ('float', 'double')
In [26]: ra.dtype
Out[26]: dtype([('float', '<f4'), ('double', '<f8')])
In [27]: rb.dtype
Out[27]: dtype([('float', '<f4'), ('double', '<f8')]) # not the original!
Original ticket http://projects.scipy.org/numpy/ticket/1127 on 2009-06-05 by @FrancescAlted, assigned to unknown.
The dtype object seems to be shared after a copy of a structured array is done. This is inconvenient when you change properties in one of arrays and these are propagated to the other.
The next snippet exposes the problem: