[Numpy-discussion] numpy endian question
Stefan van der Walt
Fri Apr 27 07:56:40 CDT 2007
On Fri, Apr 27, 2007 at 08:49:16AM -0400, Christopher Hanley wrote:
> >> -> isBigEndian = (obj.dtype.str == '>')
> > Is this test always safe, even on big endian machines? Couldn't the
> > dtype.str 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 sometimes be '|'?
More information about the Numpy-discussion