[Numpy-discussion] formats in record array

Rick White rlw at stsci.edu
Wed Jul 21 12:23:07 CDT 2004


On Wed, 21 Jul 2004, Jin-chung Hsu wrote:

> > From: Russell E Owen <rowen at u.washington.edu>
> > Subject: Re: [Numpy-discussion] Proposed record array behavior: the rest
> > of the story
> >
> > Will it be possible, when creating a new records array, to specify
> > types of a record array as a list of normal numarray types? Currently
> > one has to specify the types as a "formats" string, which is
> > nonstandard.
>
> In theory it is easy to do that except you can't specify cell arrays, i.e.
> how do you specify the equivalent of:
>
> formats=['3Int16', '(4,5)Float32']
>
> with the numarray type instances?
>
> JC Hsu

Well, how about one (or both) of these:

formats = 3*(Int16,), 4*(5*(Float32,),)

formats = (3,Int16), ((4,5), Float32)






More information about the Numpy-discussion mailing list