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

Sebastian Haase haase@msg.ucsf....
Tue Jul 3 01:35:31 CDT 2007


any comments !?

On 6/25/07, Sebastian Haase <haase@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