[pypy-commit] pypy default: fix those tests, bad fijal, no cookie

fijal noreply at buildbot.pypy.org
Fri Sep 21 10:35:37 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r57447:12bb3f2125bb
Date: 2012-09-21 10:35 +0200
http://bitbucket.org/pypy/pypy/changeset/12bb3f2125bb/

Log:	fix those tests, bad fijal, 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
@@ -63,7 +63,7 @@
         return space.wrap(loop.tostring(space, self))
 
     def getitem_filter(self, space, arr):
-        if len(arr.get_shape()) > 1:
+        if len(arr.get_shape()) > 1 and arr.get_shape() != self.get_shape():
             raise OperationError(space.w_ValueError,
                                  space.wrap("boolean index array should have 1 dimension"))
         if arr.get_size() > self.get_size():
@@ -74,7 +74,7 @@
         return loop.getitem_filter(res, self, arr)
 
     def setitem_filter(self, space, idx, val):
-        if len(idx.get_shape()) > 1:
+        if len(idx.get_shape()) > 1 and idx.get_shape() != self.get_shape():
             raise OperationError(space.w_ValueError,
                                  space.wrap("boolean index array should have 1 dimension"))
         if idx.get_size() > self.get_size():


More information about the pypy-commit mailing list