[pypy-commit] pypy default: Translation fix. No cookie

arigo noreply at buildbot.pypy.org
Tue Dec 6 18:07:13 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r50215:a88a15a5ccb7
Date: 2011-12-06 18:08 +0100
http://bitbucket.org/pypy/pypy/changeset/a88a15a5ccb7/

Log:	Translation fix. No cookie

diff --git a/pypy/module/micronumpy/interp_numarray.py b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -184,7 +184,8 @@
         n_new_elems_used = 1
         oldI = -1
         n_old_elems_to_use = old_shape[-1]
-        for s in new_shape[::-1]:
+        for i in range(len(new_shape) - 1, -1, -1):
+            s = new_shape[i]
             new_strides.insert(0, cur_step * n_new_elems_used)
             n_new_elems_used *= s
             while n_new_elems_used > n_old_elems_to_use:


More information about the pypy-commit mailing list