[Numpy-tickets] [NumPy] #236: reduceat cornercase
NumPy
numpy-tickets at scipy.net
Mon Aug 7 23:56:41 CDT 2006
#236: reduceat cornercase
-----------------------------+----------------------------------------------
Reporter: martin_wiechert | Owner: somebody
Type: enhancement | Status: new
Priority: normal | Milestone: 1.0 Release
Component: numpy.core | Version: devel
Severity: normal | Resolution:
Keywords: |
-----------------------------+----------------------------------------------
Changes (by oliphant):
* type: defect => enhancement
Comment:
Unfortunately, perhaps, the reduceat method of NumPy follows the behavior
of the reduceat method of Numeric for this corner case.
There is no facility for returning the "identity" element of the operation
in cases of index-equality. The defined behavior is to return the element
given by the first index if the slice returns an empty sequence.
Therefore, the documented and actual behavior of reduceat in this case is
to construct
[a[1], add.reduce(a[1:])]
This is a feature request.
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/236>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list