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

Francesc Alted falted at openlc.org
Tue Feb 4 05:01:05 CST 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




More information about the Numpy-discussion mailing list