
Does numpy have something like Matlab's accumarray? http://www.mathworks.com/access/helpdesk/help/techdoc/ref/accumarray.html Best, Gabriel

On Wed, Mar 26, 2008 at 5:20 PM, Gabriel J.L. Beckers <beckers@orn.mpg.de> wrote:
Does numpy have something like Matlab's accumarray?
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/accumarray.html
No. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco

On Wed, Mar 26, 2008 at 5:20 PM, Gabriel J.L. Beckers <beckers@orn.mpg.de> wrote:
Does numpy have something like Matlab's accumarray? http://www.mathworks.com/access/helpdesk/help/techdoc/ref/accumarray.html
On Wed, 26 Mar 2008, Robert Kern apparently wrote:
No.
But of course you can do things like (1d example) vals[subs==2].sum() Cheers, Alan Isaac
participants (3)
-
Alan G Isaac
-
Gabriel J.L. Beckers
-
Robert Kern