[Numpy-discussion] more than 2-D numarrays in recarray?

Perry Greenfield perry at stsci.edu
Tue Feb 4 07:41:02 EST 2003


> 
> A Dimarts 04 Febrer 2003 13:19, Todd Miller va escriure:
> > I see two problems with multi-d numarray fields, both
> > solvable:
> >
> > 1.  Multidimensional numarrays must be described in the recarray spec.
> >
> > 2. Either numarray or recarray must be able to handle a (slightly) more
> > complicated case of recomputing array strides from shape and
> > (bytestride,record-length).
> >
> > I didn't design or implement recarray so there may be other problems as
> > well.
> 
> I had a look at the code and it seems like you are right.
> 
> > I don't think it's a priority now.  What do you need them for?
> 
> Well, I've adopted the recarray object (actually a slightly 
> modified version
> of it) to be a fundamental building block in next release of PyTables. If
> arbitrary dimensionality were implemented, the resulting tables would be
> more general. Moreover, I'm thinking about implementing unlimited 
> (just one
> axis) array dimension support and having a degenerated recarray with just
> one column as a multimensional numarray object would easy quite a lot the
> implementation.
> 
> Of course, I could implement my own recarray version with that 
> support, but
> I just don't want to diverge so much from the reference implementation.
> 
> -- 
> Francesc Alted
> 
As Todd says, the initial implementation was to support only 1-d cases.
There is no fundamental reason why it shouldn't support the general case.
We'd like to work with you about how that should be best implemented.
Basically the issue is how we save the shape information for that field.
I don't think it would be hard to implement.

Perry




More information about the NumPy-Discussion mailing list