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

Sebastian Haase haase at msg.ucsf.edu
Tue Jul 3 02:35:31 EDT 2007


any comments !?

On 6/25/07, Sebastian Haase <haase at msg.ucsf.edu> wrote:
> 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