[Numpy-discussion] numpy endian question
Russell E. Owen
rowen at cesmail.net
Thu Apr 26 14:38:55 EDT 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