[Numpy-discussion] numpy endian question

Russell E. Owen rowen@cesmail....
Thu Apr 26 13:38:55 CDT 2007

In converting some code from numarray to numpy I had this:
isBigendian = (arr.isbyteswapped() != numarray.isBigEndian)

The only numpy version I've come up with is:
isBigEndian = (arr.dtype.descr[0][1][0] == '>')

which is short but very obscure. Has anyone got a suggestion for a 
clearer test? I found lots of *almost* useful flags and methods.

-- Russell

More information about the Numpy-discussion mailing list