Re: [Numpy-discussion] Structured array sorting

2010-01-18 Thread Thomas Robitaille
Warren Weckesser-3 wrote: Looks like 'sort' is not handling endianess of the column data correctly. If you change the type of the floating point data to 'f8', the sort works. Thanks for identifying the issue - should I submit a bug report? Thomas -- View this message in context:

Re: [Numpy-discussion] Structured array sorting

2010-01-18 Thread Charles R Harris
On Mon, Jan 18, 2010 at 6:39 AM, Thomas Robitaille thomas.robitai...@gmail.com wrote: Warren Weckesser-3 wrote: Looks like 'sort' is not handling endianess of the column data correctly. If you change the type of the floating point data to 'f8', the sort works. Thanks for

[Numpy-discussion] Structured array sorting

2010-01-17 Thread Thomas Robitaille
I am having trouble sorting a structured array - in the example below, sorting by the first column (col1) seems to work, but not sorting by the second column (col2). Is this a bug? I am using numpy svn r8071 on MacOS 10.6. Thanks for any help, Thomas Python 2.6.1 (r261:67515, Jul 7 2009,

Re: [Numpy-discussion] Structured array sorting

2010-01-17 Thread Warren Weckesser
Looks like 'sort' is not handling endianess of the column data correctly. If you change the type of the floating point data to 'f8', the sort works. Here's another example with short ints: - In [137]: z = np.array([(0,),(258,),(256,),(1,),(255,)], dtype=[('num','i2')]) In [138]: