[Numpy-discussion] new question - summing a list of arrays

lorenzo bolla lbolla@gmail....
Tue Mar 18 10:43:00 CDT 2008


use the "axis" argument in sum.
L.

On Tue, Mar 18, 2008 at 4:27 PM, Chris Withers <chris@simplistix.co.uk>
wrote:

> Keith Goodman wrote:
> >>> sum(x)
> >
> > matrix([[ 1.15063313],
> >         [ 0.8841396 ],
> >         [ 1.7370669 ]])
>
> When these are arrays, I just get a single number sum back...
>
> Chris
>
> --
> Simplistix - Content Management, Zope & Python Consulting
>            - http://www.simplistix.co.uk
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
Lorenzo Bolla
lbolla@gmail.com
http://lorenzobolla.emurse.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080318/f3df20d1/attachment.html 


More information about the Numpy-discussion mailing list