[Numpy-discussion] Three bugs fixed

Charles R Harris charlesr.harris@gmail....
Thu Dec 3 15:47:05 CST 2009

On Thu, Dec 3, 2009 at 2:07 PM, Travis Oliphant <oliphant@enthought.com>wrote:

> Thanks to the reporters of tickets  #1108, #1197 (similar to #1279), and
> #1222.
> Pointing out these problems allowed me to find and squash two subtle memory
> leaks and one just plain stupid bug lurking in reduce-at (when using the
> buffered internal loop).
> I think I fixed the problems.  I added a test for #1108, but  I don't have
> good tests for the memory leak fixes.    I'm not sure how to write a good
> test for those.
> Even though it may take several months to get to the tickets with my
> limited time, please do continue to report problems.   I'm hoping to have
> more time for NumPy next year.
Good job! Nice to have the reduceat bug tracked down. Now for some nits ;)

1) Could you format your multiline comments like:
 * blah

You should be able to set up your editor to do that automatically.

2) You don't need a continuation here

-    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) {

3) Commit to the trunk first, then backport to the release candidate after
checking the buildbot. The SPARC machines are still giving bus errors after
the reduceat fix and this bug is now part of the release candidate.

4) What is this?

-#include "npy_config.h"
+#include "npy_config.h" c

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091203/7c34704a/attachment.html 

More information about the NumPy-Discussion mailing list