[Numpy-discussion] Some comments on the Numeric3 Draft of 1-M ar-05

konrad.hinsen at laposte.net konrad.hinsen at laposte.net
Thu Mar 3 00:27:19 CST 2005


On 03.03.2005, at 00:23, Sebastien.deMentendeHorne at electrabel.com wrote:

> Another useful type for arrays representing physical values would be an
> array that keeps vectors for each dimension with index values. For 
> instance,
> an object representing temperature at a given time in a given location 
> would
> consist in
>     data = N x M array of Float64 = [ [ 23, 34, 23], [ 31, 28,29] ]
>     first_axis = N array of time = [ "01/01/2004", "02/01/2004" ]
>     second_axis = M array of location = [ "Paris", "New York" ]
>
> All slicing operation would equivalently slice the corresponding axis.

That is indeed useful, 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.

Konrad.





More information about the Numpy-discussion mailing list