[Numpy-discussion] Recarray comparison and byte order

Ian Mallett geometrian at gmail.com
Sat Oct 31 14:46:50 EDT 2009


On Sat, Oct 31, 2009 at 9:38 AM, Matthew Brett <matthew.brett at gmail.com>wrote:

> c = a.byteswap().newbyteorder()
> c == a
>
In the last two lines, a variable "c" is assigned to a modified "a".  The
next line tests (==) to see if "c" is the same as (==) the unmodified "a".
It isn't, because "c" is the modified "a".  Hence, "False".

Do you mean:
c = a
instead of:
c == a
...?

HTH,
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20091031/c1ccf72e/attachment.html>


More information about the NumPy-Discussion mailing list