diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2012-05-28 14:14:41 -0500 |
---|---|---|
committer | Mark Wiebe <mwwiebe@gmail.com> | 2012-05-28 14:14:41 -0500 |
commit | 4542c43b567af9064f36759afe6064bbb3315728 (patch) | |
tree | d8925acf8e16b1b9f7e77ec6402be1d1d56c3a37 /numpy/core/arrayprint.py | |
parent | dabe9ab064ae32bfd7cee8c0dc58b175a6955e49 (diff) | |
download | numpy-4542c43b567af9064f36759afe6064bbb3315728.tar.gz |
BUG: Add a new flag to nditer to indicate when op uses buffering
Thouis tracked down an intermittently occurring bug in
ticket #2144, where a reduction under certain situations
would produce wrong results. This occurs when the array
data and the nditer's buffer happen to be adjacent in
memory.
This fixes it by replacing the "clever" trick of checking if
the iterator's pointer is in the buffer with an explicit
flag to signal buffer usage. The reason this can't be reliably
handled via the pointer/buffer check is that the pointer updates
are handled by the consumer of the iterator, who may update
them in place or may use local variables instead. Thus, the
pointer could still point to the beginning of the buffer, or
could point at the byte immediately after the buffer. Using
a flag avoids all of this and should be reliable.
Diffstat (limited to 'numpy/core/arrayprint.py')
0 files changed, 0 insertions, 0 deletions