[Numpy-discussion] arr.dtype.byteorder == '=' --- is this "good code"
Sebastian Haase
haase at msg.ucsf.edu
Mon Jun 25 04:33:08 EDT 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