Masahiro Tanaka wrote:
> reshape changes the shape of NArray without changing internal 
> arrangement.
> In this case, it changes the last dimension with 100 elements into
> 2-dimensions with 10x10 elements.

Thanks again.
Apologies for the nuisance, but I would like to ask one further question 
in order to assist in my understanding. If I have an array that's 
96x73x1680 and would like to take the mean of every 12th element from 
the 3rd dimension, ending up with 96x73x12 (each point in the 3rd 
dimension is therefore the mean of 140 points from the original array), 
would it be correct to use:

new = narray.reshape!(96,73,12,140).mean(3)

?

>   note: * If dimensions are specified, statistics are performed
>           on those dimensions and the rest dimensions are kept.

Ah, I see.
-- 
Posted via http://www.ruby-forum.com/.