[Numpy-discussion] Controlling endianness of ndarray.tofile()

Ben Forbes bdforbes@gmail....
Tue Jun 21 03:22:54 CDT 2011


Hi,

On my system (Intel Xeon, Windows 7 64-bit), ndarray.tofile() outputs
in little-endian. This is a bit inconvenient, since everything else I
do is in big-endian. Unfortunately, scipy.io.write_arrray() is
deprecated, and I can't find any other routines that write pure raw
binary. Are there any other options, or perhaps could tofile() be
modified to allow control over endianness?

Cheers,
Ben

-- 
Benjamin D. Forbes
School of Physics
The University of Melbourne
Parkville, VIC 3010, Australia


More information about the NumPy-Discussion mailing list