
April 27, 2007
12:56 p.m.
On Fri, Apr 27, 2007 at 08:49:16AM -0400, Christopher Hanley wrote:
-> isBigEndian = (obj.dtype.str[0] == '>')
Is this test always safe, even on big endian machines? Couldn't the dtype.str[0] sometimes be '='?
The test does would on big endian machines. What wouldn't work would be something like this:
-> isBigEndian = (obj.dtype.byteorder == '>')
On a big-endian machine you would get '=' in this case.
Ah, yes, I was confused. What I meant to ask was, couldn't dtype.str[0] sometimes be '|'? Cheers Stéfan