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

Magnus Lie Hetland magnus at hetland.org
Fri Dec 27 14:57:01 EST 2002


Tim Churches <tchur at optushome.com.au>:
[snip]
> Have a look at the discussion on RecordArrays in this overview of
> Numarray: http://stsdas.stsci.edu/numarray/DesignOverview.html

Sounds interesting.

> However, in the meantime, as you note, its not too hard to write a class
> which emulates R/S-Plus data frames. Just store each column in its own
> Numeric array of the appropriate type

Yeah -- it's just that I'd like to keep a set of columns collected as
a two-dimensional array, to allow horizontal summing and the like.
(Not much more complicated, but an extra issue to address.)

> (which might be the PyObject
> types, which can hold any Python object type),

Hm. Yes. I can't seem to find these anymore. I seem to recall using
type='o' or something in Numeric, but I can't find the right type
objects now... (Guess I'm just reading the docs and dir(numeric)
poorly...) It would be nice if array(['foo']) just worked. Oh, well.

[snip]
> Happy to
> collaborate on furthering this idea.

That would be great (even though I don't really have any time to use
for this -- it's just a really tiny part of a small project I'm
working on :)

> By memory-mapping disc-based
> versions of the  Numeric arrays, and using the BsdDb3 record number
> database format for the string columns, you can even make a disc-based
> "record array" which can be larger than available RAM+swap.

Sounds quite useful, although quite similar to MetaKit. (I suppose I
could use some functions from numarray on columns in MetaKit... But
that might just be too weird -- and it would still just be a
collection of columns :])

[snip]

Thanks for your input.

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




More information about the NumPy-Discussion mailing list