[Numpy-discussion] metadata and metabehavior for arrays (for scipy.base or Numeric3)
Colin J. Williams
cjw at sympatico.ca
Wed Apr 6 03:33:05 EDT 2005
Sébastien de Menten wrote:
> Hi,
>
> I follow with great interest the threads around Numeric3/scipy.base.
> As Travis suggested (“It would also help if other people who have
> concerns would voice them (I'm very grateful for those who have
> expressed their concerns) so that we can all address them and get on
> the same page for future development.”), I voice my concert J
>
> Sometimes it is quite useful to treat data at a higher level than just
> an “array of number of some types”. Adding metadata to array (I called
> them “augmented arrays”) is a simple way to add sense to an array. I
> see different user cases like:
> 1) attaching a physical unit to array data (see for instance Unum
> http://home.tiscali.be/be052320/Unum.html )
> 2) description of axis (see
> http://sourceforge.net/mailarchive/message.php?msg_id=11051806). Very
> useful to manipulate easily time series.
Does the record array provide a means of addressing this need?
> 3) masked arrays as in MA module of Numeric
> 4) arrays for interval arithmetic where one keep another array with
> precision of data
> 5) record arrays (currently being integrated in scipy.base as a base
> type)
>
Yes, and there is numarray's array of objects.
> The current solution for those situation is nicely summarized by
> quoting Konrad
> “but rather a class written using arrays than a variety of the basic
> array type.
> It’s actually pretty straightforward to implement, the most difficult
> choice being the form of the constructor that gives most flexibility
> in use.”
>
[snip]
Colin W.
More information about the NumPy-Discussion
mailing list