[pypy-commit] pypy numpypy-ellipse-indexing: wip, passes test_ztranslation

mattip noreply at buildbot.pypy.org
Tue May 14 10:17:58 CEST 2013


Author: Matti Picus <matti.picus at gmail.com>
Branch: numpypy-ellipse-indexing
Changeset: r64060:583a3ab54db6
Date: 2013-05-14 00:59 +0300
http://bitbucket.org/pypy/pypy/changeset/583a3ab54db6/

Log:	wip, passes test_ztranslation

diff --git a/pypy/interpreter/special.py b/pypy/interpreter/special.py
--- a/pypy/interpreter/special.py
+++ b/pypy/interpreter/special.py
@@ -5,13 +5,13 @@
     def __init__(self, space):
         self.space = space
 
-    def descr__repr__(self):
-        return self.space.wrap('Ellipsis')
+    def descr__repr__(self, space):
+        return space.wrap('Ellipsis')
 
 
 class NotImplemented(W_Root):
     def __init__(self, space):
         self.space = space
 
-    def descr__repr__(self):
-        return self.space.wrap('NotImplemented')
+    def descr__repr__(self, space):
+        return space.wrap('NotImplemented')
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
@@ -13,6 +13,7 @@
      raw_storage_setitem, RAW_STORAGE
 from pypy.module.micronumpy.arrayimpl.sort import argsort_array
 from rpython.rlib.debug import make_sure_not_resized
+from pypy.interpreter.special import Ellipsis
 
 
 class BaseConcreteArray(base.BaseArrayImplementation):
@@ -157,6 +158,7 @@
         """
         if (space.isinstance_w(w_idx, space.w_str) or
             space.isinstance_w(w_idx, space.w_slice) or
+            isinstance(w_idx, Ellipsis) or
             space.is_w(w_idx, space.w_None)):
             raise IndexError
         if isinstance(w_idx, W_NDimArray) and not isinstance(w_idx.implementation, scalar.Scalar):


More information about the pypy-commit mailing list