[NumPy-Tickets] [NumPy] #2144: .max(0) on reshaped array returns inconsistent results.
NumPy Trac
numpy-tickets@scipy....
Sat May 26 06:52:45 CDT 2012
#2144: .max(0) on reshaped array returns inconsistent results.
--------------------+-------------------------------------------------------
Reporter: thouis | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: Other | Version: devel
Keywords: |
--------------------+-------------------------------------------------------
Comment(by thouis):
Based on some more testing, I expect that there is no off-by-one error,
but rather there's an assumption that the buffer is not adjacent to the
destination (assuming I'm reading the code correctly).
For the newly failing test, this is what some simple instrumenting
reports:
{{{
test_where_param_buffer_output (test_ufunc.TestUfunc) ... Buffer
allocated: 10294f670
Delta 80 compared to 80
FAIL
...
}}}
Perhaps the correct approach is to allocate the buffer with some
"fencepost" space (8 bytes for alignment?) at the beginning, and use it
with an offset to ensure that the assumption can't be violated.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/2144#comment:6>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list