[Numpy-discussion] numpy endian question

Stefan van der Walt stefan at sun.ac.za
Fri Apr 27 06:16:40 EDT 2007


On Thu, Apr 26, 2007 at 05:22:42PM -0400, Christopher Hanley wrote:
> This should work as a consistent test for bigendian:
> 
> -> isBigEndian = (obj.dtype.str[0] == '>')

Is this test always safe, even on big endian machines?  Couldn't the
dtype.str[0] sometimes be '='?

Regards
Stéfan



More information about the NumPy-Discussion mailing list