Author: Maciej Fijalkowski <fij...@gmail.com>
Branch: 
Changeset: r58378:5a092f4dfea7
Date: 2012-10-23 11:58 +0200
http://bitbucket.org/pypy/pypy/changeset/5a092f4dfea7/

Log:    merge

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
@@ -307,7 +307,8 @@
     def descr_take(self, space, w_obj, w_axis=None, w_out=None):
         # if w_axis is None and w_out is Nont this is an equivalent to
         # fancy indexing
-        raise Exception("unsupported for now")
+        raise OperationError(space.w_NotImplementedError,
+                             space.wrap("unsupported for now"))
         if not space.is_none(w_axis):
             raise OperationError(space.w_NotImplementedError,
                                  space.wrap("axis unsupported for take"))
diff --git a/pypy/module/micronumpy/test/test_numarray.py 
b/pypy/module/micronumpy/test/test_numarray.py
--- a/pypy/module/micronumpy/test/test_numarray.py
+++ b/pypy/module/micronumpy/test/test_numarray.py
@@ -1961,8 +1961,11 @@
         assert (arange(6).reshape(2, 3).T.ravel() == [0, 3, 1, 4, 2, 5]).all()
 
     def test_take(self):
-        skip("we wait for int-based indexing")
         from _numpypy import arange
+        try:
+            arange(10).take([0])
+        except NotImplementedError:
+            skip("we wait for int-based indexing")
         assert (arange(10).take([1, 2, 1, 1]) == [1, 2, 1, 1]).all()
         raises(IndexError, "arange(3).take([15])")
         a = arange(6).reshape(2, 3)
diff --git a/pypy/objspace/flow/flowcontext.py 
b/pypy/objspace/flow/flowcontext.py
--- a/pypy/objspace/flow/flowcontext.py
+++ b/pypy/objspace/flow/flowcontext.py
@@ -977,8 +977,8 @@
             keywords = None
             keywords_w = None
         arguments = self.popvalues(n_arguments)
-        args = self.argument_factory(arguments, keywords, keywords_w, w_star,
-                                     w_starstar)
+        args = ArgumentsForTranslation(self.space, arguments, keywords,
+                keywords_w, w_star, w_starstar)
         w_function  = self.popvalue()
         w_result = self.space.call_args(w_function, args)
         self.pushvalue(w_result)
@@ -1164,11 +1164,6 @@
     LOAD_CLOSURE = BAD_OPCODE
     MAKE_CLOSURE = BAD_OPCODE
 
-    def make_arguments(self, nargs):
-        return ArgumentsForTranslation(self.space, self.peekvalues(nargs))
-    def argument_factory(self, *args):
-        return ArgumentsForTranslation(self.space, *args)
-
 ### Frame blocks ###
 
 class SuspendedUnroller(object):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to