[pypy-commit] pypy numpy-refactor: a fix for multidim arrays

fijal noreply at buildbot.pypy.org
Wed Sep 5 18:00:00 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: numpy-refactor
Changeset: r57151:04a347616892
Date: 2012-09-05 17:48 +0200
http://bitbucket.org/pypy/pypy/changeset/04a347616892/

Log:	a fix for multidim arrays

diff --git a/pypy/module/micronumpy/arrayimpl/concrete.py b/pypy/module/micronumpy/arrayimpl/concrete.py
--- a/pypy/module/micronumpy/arrayimpl/concrete.py
+++ b/pypy/module/micronumpy/arrayimpl/concrete.py
@@ -215,6 +215,8 @@
                 raise OperationError(space.w_IndexError,
                                      space.wrap("invalid index"))
             return self._lookup_by_index(space, view_w)
+        if shape_len > 1:
+            raise IndexError
         idx = int_w(space, w_idx)
         return self._lookup_by_index(space, [space.wrap(idx)])
 


More information about the pypy-commit mailing list