[Numpy-discussion] Non-numerical info associated with sub-arrays

Magnus Lie Hetland magnus at hetland.org
Fri Dec 27 13:30:03 EST 2002


I'm working on some two-dimensional tables of data, where some data
are numerical, while other aren't. I'd like to use numarray's
numerical capabilities with the numerical parts (columns) while
keeping the data in each row together. (I'm sure this generalizes to
more dimensions, and to sub-arrays in general, not just rows.)

It's not a hard problem, really, but the obvious solution--to keep
the other rows in separate arrays/lists and just juggle things
around--seems a bit clunky. I was just wondering if anyone had other
ideas (would it be practical to include all the data in a single array
somehow--I seem to recall that Numeric could have arbitrary object
arrays, but I'm not sure whether numarray supports this?) or perhaps
some hints on how to organize code around this? I wrote a small class
that wraps things up and works a bit lik R/S-plus's data frames; is
there some other more standard code out there for this sort of thing?
(It's a problem that crops up often in data processing of various
kinds...)

Thanks,

Magnus

-- 
Magnus Lie Hetland
http://hetland.org




More information about the NumPy-Discussion mailing list