[pypy-commit] pypy numpy-fancy-indexing: fix translation

fijal noreply at buildbot.pypy.org
Wed Sep 19 16:46:00 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: numpy-fancy-indexing
Changeset: r57388:4911e03e41f5
Date: 2012-09-19 16:44 +0200
http://bitbucket.org/pypy/pypy/changeset/4911e03e41f5/

Log:	fix translation

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
@@ -101,7 +101,7 @@
                     shape = shape_agreement(space, shape, w_item)
                 indexes_w[i] = w_item
                 if not arr_index_in_shape:
-                    res_shape.append(None)
+                    res_shape.append(-1)
                     arr_index_in_shape = True
             else:
                 if space.isinstance_w(w_item, space.w_slice):
@@ -112,7 +112,7 @@
                 indexes_w[i] = w_item
         real_shape = []
         for i in res_shape:
-            if i is None:
+            if i == -1:
                 real_shape += shape
             else:
                 real_shape.append(i)


More information about the pypy-commit mailing list