[SciPy-user] mean of arrays...
Thu Sep 6 07:40:39 CDT 2007
If the mean must be done on the last dimension, add axis=-1, it should work.
2007/9/6, fred <email@example.com>:
> 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.
> SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user