[Numpy-tickets] [NumPy] #237: reduceat should handle outlier indices gracefully

NumPy numpy-tickets at scipy.net
Mon Aug 7 08:01:20 CDT 2006


#237: reduceat should handle outlier indices gracefully
-----------------------------+----------------------------------------------
 Reporter:  martin_wiechert  |       Owner:  somebody   
     Type:  enhancement      |      Status:  new        
 Priority:  normal           |   Milestone:  1.0 Release
Component:  numpy.core       |     Version:  devel      
 Severity:  normal           |    Keywords:             
-----------------------------+----------------------------------------------
 to the very least <operator>.reduceat (a, I) should accept len (a) in I

 usage example:
 {{{
 def weighted_histo (binborders, data):
     sd = sort (data)
     I = sd.searchsorted (binborders)
     # Now elements of I may range between 0 and len (sd).
     return add.reduceat (sd, I)
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/237>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list