[Numpy-discussion] reading big-endian uint16 into array on little-endian machine
greg whittier
gregwh at gmail.com
Thu Jun 17 12:14:23 EDT 2010
On Thu, Jun 17, 2010 at 12:11 PM, Peter
<numpy-discussion at maubp.freeserve.co.uk> wrote:
> On Thu, Jun 17, 2010 at 3:29 PM, greg whittier <gregwh at 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.
Thanks,
Greg
More information about the NumPy-Discussion
mailing list