[Numpy-discussion] How do I change endianess?
Christopher Hanley
chanley@stsci....
Mon Feb 25 12:57:05 CST 2008
debl2@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