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

greg whittier gregwh@gmail....
Thu Jun 17 11:14:23 CDT 2010

On Thu, Jun 17, 2010 at 12:11 PM, Peter
<numpy-discussion@maubp.freeserve.co.uk> wrote:
> On Thu, Jun 17, 2010 at 3:29 PM, greg whittier <gregwh@gmail.com> wrote:
> I'm unclear if you want a numpy array or a standard library array,
> but can you exploit the fact that struct.unpack returns a tuple? e.g.
> struct.unpack(">%iH" % count, fd.read(2*count))
> Peter

I want a numpy array.  Robert answered it, but this works also.


More information about the NumPy-Discussion mailing list