M
Milo Thurston
I'm trying to perform some calculations on data held in NArray objects
but it is not entirely clear to me how this ought to be done (I've
looked here: http://narray.rubyforge.org/SPEC.en). The data consist of
3-dimensional arrays, e.g. 10x10x100 elements. What I'd like to do is
calculate the means for the data at each for each of the first two
dimensions for positions of the third dimension. For example, 1,11,21...
then 2,12,22..., 3,13,23... &c. The end result would be a 10x10x10 array
where position [0,0,0] would contain the mean of the values in
[0,0,0],[0,0,9],[0,0,19]...[0,0,99] of the original array.
If this makes any sense to anyone I'd appreciate any suggestions.
but it is not entirely clear to me how this ought to be done (I've
looked here: http://narray.rubyforge.org/SPEC.en). The data consist of
3-dimensional arrays, e.g. 10x10x100 elements. What I'd like to do is
calculate the means for the data at each for each of the first two
dimensions for positions of the third dimension. For example, 1,11,21...
then 2,12,22..., 3,13,23... &c. The end result would be a 10x10x10 array
where position [0,0,0] would contain the mean of the values in
[0,0,0],[0,0,9],[0,0,19]...[0,0,99] of the original array.
If this makes any sense to anyone I'd appreciate any suggestions.