[Numpy-discussion] How do I change endianess?
Christopher Hanley
chanley at stsci.edu
Mon Feb 25 13:57:05 EST 2008
debl2 at verizon.net wrote:
> I would like to change the Endianess of a large of data written on PC so I can process it on a Solaris box. I see that the dtype.str attribute is read-only.
>
> TIA
>
> David Lees
>
>
You can use the byteswap method to change the byte order of your array.
>>> obj = obj.byteswap()
--
Christopher Hanley
Systems Software Engineer
Space Telescope Science Institute
3700 San Martin Drive
Baltimore MD, 21218
(410) 338-4338
More information about the NumPy-Discussion
mailing list