[Numpy-discussion] Proposal for new ufunc functionality

Travis Oliphant oliphant@enthought....
Tue Apr 13 09:13:10 CDT 2010

On Apr 12, 2010, at 5:54 PM, Warren Weckesser wrote:
> A bit more generalization of `by` gives behavior like matlab's  
> accumarray
> (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/accumarray.html 
> ),
> which I partly cloned here:
> [This would be a link to the scipy cookbook, but scipy.org is not
> responding.]

Reading the accumarray docstring, it does seem related, but they use  
the "subs" array as an index into the original array (instead of an  
index into the "output" array like Robert's simplification).    I do  
like the Matlab functionality, but would propose a different reduction  
function:  reduceover  to implement it.

It also feels like we should figure out different kinds of reductions  
for generalized ufuncs as well.    If anyone has a primer on  
generalized ufuncs, I would love to see it.   Isn't a reduction on a  
generalized ufunc just another generalized ufunc?   Perhaps we could  
automatically create these "reduced generalized ufuncs"

I would love to explore just how general these generalized ufuncs are  
and what can be subsumed by them.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100413/6b40a8b7/attachment.html 

More information about the NumPy-Discussion mailing list