New submission from Bryan <[email protected]>: To reproduce:
1) Start pypy (results are usually more nondeterministic with ipython rather than straight pypy, but it doesn't matter which) 2) Run the following: >>>> import numpy as np >>>> np.array([]).reshape(0,2).sum(0) Here are some of the results I've gotten: array([ 2.68156159e+154, -2.31584192e+077]) array([ 0., 0.]) # which is correct array([ 1.72723371e-77, 1.72723371e-77]) array([ 1.28822975e-231, 1.28822975e-231]) and so forth. It looks like some kind of overflow problem. With the regular pypy repl, you usually get long sequences of the same answer, though restarting the repl consistently produces different answers. Note that Python + main numpy produces the correct result of array([ 0., 0.]) consistently. I apologize if this is the wrong place for this bug report. Let me know if there's somewhere more appropriate to submit it. I'm using the pypy fork of numpy 1.8.0.dev-6b8df83 and pypy 2.2.1 on OS X 10.9. Let me know if you'd like any other information. ---------- messages: 6394 nosy: pypy-issue, qiemem priority: bug status: unread title: numpy: summing over an empty, mutli-dimensional array produces incorrect, nondeterministic results ________________________________________ PyPy bug tracker <[email protected]> <https://bugs.pypy.org/issue1650> ________________________________________ _______________________________________________ pypy-issue mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-issue
