thouis / numpy-trac-migration

numpy Trac to github issues migration
2 stars 3 forks source link

Alignment doesn't work for array of structs (Trac #2211) #6000

Open numpy-gitbot opened 11 years ago

numpy-gitbot commented 11 years ago

Original ticket http://projects.scipy.org/numpy/ticket/2211 on 2012-09-05 by trac user Ihor.Melnyk, assigned to unknown.

array of subtype alignment

t = np.dtype([('a', '|i1'), ('b', [('f0', '<i2'), ('f1', '<f4')], 2)], align=True)

actual dtype

[('a', '|i1'), ('b', [('f0', '<i2'), ('f1', '<f4')], (2,))]

expected dtype

[('a', '|i1'), (_, '|V3'), ('b', [('f0', '<i2'), (_, '|V2'), ('f1', '<f4')], 2)]