[Numpy-discussion] Segfault on byteswap() on recarrays
Travis Oliphant
oliphant.travis at ieee.org
Mon Sep 18 15:53:44 CDT 2006
Matthew Brett wrote:
> Hi,
>
> I noticed this works:
>
> In [5]:a = array((1,), dtype=[('one', '<i4')])
>
> In [6]:a.byteswap()
> Out[6]:
> array((16777216,),
> dtype=[('one', '<i4')])
>
> But, extending the recarray leads to a segfault on byteswapping:
>
> In [8]:a = array((1, 2), dtype=[('one', '<i4'),('two', '<i4')])
>
> In [9]:a.byteswap()
> Segmentation fault
>
Great catch. Fixed in SVN.
-Travis
More information about the Numpy-discussion
mailing list