[Numpy-discussion] reading big-endian uint16 into array on little-endian machine

Robert Kern robert.kern@gmail....
Thu Jun 17 09:41:28 CDT 2010


On Thu, Jun 17, 2010 at 09:29, greg whittier <gregwh@gmail.com> wrote:
> I have files (from an external source) that contain ~10 GB of
> big-endian uint16's that I need to read into a series of arrays.

np.fromfile(filename, dtype='>i2')

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the NumPy-Discussion mailing list