[pypy-issue] [issue1014] numpypy sum() buggy with axis

mattip tracker at bugs.pypy.org
Sun Jan 22 12:23:42 CET 2012


mattip <matti.picus at gmail.com> added the comment:

Indeed, fromnumeric.py needs at the minimum this fix.

diff -r 5aa09e8483d3 lib_pypy/numpypy/fromnumeric.py
--- a/lib_pypy/numpypy/fromnumeric.py   Wed Jan 18 23:04:56 2012 +0100
+++ b/lib_pypy/numpypy/fromnumeric.py   Sun Jan 22 13:17:16 2012 +0200
@@ -1353,7 +1353,7 @@
     """
     if not hasattr(a, "sum"):
         a = numpypy.array(a)
-    return a.sum()
+    return a.sum(axis)


 def product (a, axis=None, dtype=None, out=None):

----------
nosy: +mattip

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1014>
________________________________________


More information about the pypy-issue mailing list