[Numpy-discussion] arr.dtype.byteorder == '=' --- is this "good code"

Sebastian Haase haase@msg.ucsf....
Mon Jun 25 03:33:08 CDT 2007


Hi,
Suppose I'm on a little-edian system.
Could I have a little-endian numpy array arr, where
arr.dtype.byteorder
would actually be "<"
instead of  "=" !?

There are two kinds of systems: little edian and big endian.
But there are three possible byteorder values: "<", ">" and "="

I assume that if arr.dtype.byteorder is "="
then, even on a little endian system
the comparison arr.dtype.byteorder == "<"  still fails !?
Or are the == and != operators overloaded !?

Thanks,
Sebastian Haase


More information about the Numpy-discussion mailing list