On Tue, Mar 8, 2011 at 1:35 AM, Pauli Virtanen <p...@iki.fi> wrote: > > Structured array copying copies by field name. > > Commit 22d96096bf7d5fb199ca80f2fcd04e8d27815476 > > Before: > >>>> x = np.array([(0, 1)], dtype=[('a', int), ('b', int)]) >>>> y = np.array([(2, 3)], dtype=[('a', int), ('b', int)]) >>>> y = np.array([(2, 3)], dtype=[('b', int), ('a', int)]) >>>> x[:] = y >>>> x > array([(2, 3)], > dtype=[('a', '<i4'), ('b', '<i4')]) > > After: > >>>> x = np.array([(0, 1)], dtype=[('a', int), ('b', int)]) >>>> y = np.array([(2, 3)], dtype=[('b', int), ('a', int)]) >>>> x[:] = y >>>> x > array([(3, 2)], > dtype=[('a', '<i4'), ('b', '<i4')]) > > This seems like a pretty hazardous change. Granted, it's in > a bit of a grey area, but people may rely on this.
This is still backwards incompatible in current master. Should it be changed back for 1.6? Ralf _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion