[Numpy-discussion] Segfault on byteswap() on recarrays

Matthew Brett matthew.brett at gmail.com
Mon Sep 18 14:57:16 CDT 2006


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

Thanks,

Matthew




More information about the Numpy-discussion mailing list