[Numpy-discussion] Bug in 1.9?

Julian Taylor jtaylor.debian at googlemail.com
Wed Oct 22 14:28:24 EDT 2014

On 22.10.2014 20:00, Charles R Harris wrote:
> On Wed, Oct 22, 2014 at 11:32 AM, Neil Girdhar <mistersheik at gmail.com
> <mailto:mistersheik at gmail.com>> wrote:
>     Hello,
>     Is this desired behaviour or a regression or a bug?
>     http://stackoverflow.com/questions/26497656/how-do-i-align-a-numpy-record-array-recarray
>     Thanks,
> I'd guess that the definition of aligned may have become stricter,
> that's the only thing I think has changed. Maybe Julian can comment on that.

structured dtypes have not really a well defined alignment, e.g. the
stride of this is 12, so when element 0 is aligned element 1 is always

Before 1.9 structured dtype always had the aligned flag set, even if
they were unaligned.
Now we require a minimum alignment of 16 for strings and structured
types so copying which sometimes works on the whole compound type
instead of each item always works.
This was the easiest way to get the testsuite running on sparc after
fixing a couple of code paths not updating alignment information which
forced some functions to always take super slow unaligned paths (e.g.
But the logic could certainly be improved.

More information about the NumPy-Discussion mailing list