[SciPy-user] mean of arrays...

fred fredmfp@gmail....
Thu Sep 6 07:33:35 CDT 2007

Gael Varoquaux a écrit :
> On Thu, Sep 06, 2007 at 12:07:21PM +0200, fred wrote:
>> I want to compute the element wise mean of 2D or 3D arrays (~100).
> Stack all these n-arrays along an n+1 dimension, and use the numpy.mean
> function, specifying the axis as n+1.
I can get it working by hand, if dimension is fixed, no problem.
But how can I do this for a n+1 dimension array ?:
- create the array;
- fill the array.

I have one solution: test if my arrays are 2D or 3D.
If this is the only one solution, I get it,
but I would like to have a solution for whatever dimension
my arrays have. 



More information about the SciPy-user mailing list