Travis Oliphant wrote:
> How about
>
> newdtype = N.dtype([('both','2i4'),('','b1')])
> res = data.view(newdtype)['both']
That works great! thanks,
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voic
Christopher Barker wrote:
>Hi all,
>
>I'm using a recarray to read a bunch of binary data out of a file. It's
>working great, but it seems there should be a more efficient way to
>"slice" the data. Here's what I've got:
>
>The binary data is essentially a dump of a 2-d array of structs. So I
>r
Hi all,
I'm using a recarray to read a bunch of binary data out of a file. It's
working great, but it seems there should be a more efficient way to
"slice" the data. Here's what I've got:
The binary data is essentially a dump of a 2-d array of structs. So I
read it like this:
DataType = N.dty