sum over all but one axis

Johannes Loehnert a.u.r.e.l.i.a.n at
Thu Oct 26 04:51:34 CDT 2006

On Thursday 26 October 2006 11:39, Vincent Schut wrote:
> > Of course I can easily loop over that axis, but if possible I'd like to
> > prevent array loops...

Depending on the problem's size, this could actually be the best solution -- 
if each particular sum is over enough elements, the overhead of looping is 
negligible. Also it would be the best solution in terms of readability.

Without for-loops i would probably have come up with something like your 
solution, only longer and uglier. ;-)


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo

More information about the Numpy-discussion mailing list