Hi again

after some hours of debugging I finally (I think) found the problem:

numpy.sum([[0,1,2],[2,3,4]])
24

numpy.sum([[0,1,2],[2,3,4]],axis=0)
array([2, 4, 6])

numpy.sum([[0,1,2],[2,3,4]],axis=1)
array([3, 9])


Isn't the first line supposed to act as with "axis=0" by default (see
help numpy.sum!)...???
Not setting axis=0 it sums everything!

Is that the expected behaviour or is the doc not updated? (I realise it
may be better to force axis=.. to indicate what you need but still.. the
example in numpy.sum help gives:
sum([[0, 1], [0, 5]])
    array([0, 6]) which is not what it gives when you do it...)

thanks

Eric

-------------------------------------------------------------------------
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
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to