diff options
author | Travis Oliphant <oliphant@enthought.com> | 2009-12-02 22:07:16 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2009-12-02 22:07:16 +0000 |
commit | fd0866ffc7ca4c3d843b156c9a706b1a3e1ad67d (patch) | |
tree | b3cad5f0b1804f7ba37762d51f38697743b1ac3c | |
parent | b3f63a20ca2fcf46f8c83e77b1b399ab4d8d24b3 (diff) | |
download | numpy-fd0866ffc7ca4c3d843b156c9a706b1a3e1ad67d.tar.gz |
Fix Ticket #1108 by initializing correctly the block of data corresponding to the identity for the ufunc used during reduceat with a buffer.
-rw-r--r-- | numpy/core/src/umath/ufunc_object.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c index 9c292b042..acd120407 100644 --- a/numpy/core/src/umath/ufunc_object.c +++ b/numpy/core/src/umath/ufunc_object.c @@ -2512,7 +2512,8 @@ construct_reduce(PyUFuncObject *self, PyArrayObject **arr, PyArrayObject *out, else { loop->obj = 0; } - if (loop->meth == ZERO_EL_REDUCELOOP) { + if ((loop->meth == ZERO_EL_REDUCELOOP) || \ + ((operation == UFUNC_REDUCEAT) && (loop->meth == BUFFER_UFUNCLOOP))) { idarr = _getidentity(self, otype, str); if (idarr == NULL) { goto fail; |