[pypy-commit] pypy numpy-reintroduce-jit-drivers: fixes

fijal noreply at buildbot.pypy.org
Sat Sep 29 20:19:43 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: numpy-reintroduce-jit-drivers
Changeset: r57670:f080950c2294
Date: 2012-09-29 20:19 +0200
http://bitbucket.org/pypy/pypy/changeset/f080950c2294/

Log:	fixes

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
@@ -514,7 +514,7 @@
             if self.get_size() == 0:
                 raise OperationError(space.w_ValueError,
                     space.wrap("Can't call %s on zero-size arrays" % op_name))
-            return space.wrap(getattr(loop, op_name)(self))
+            return space.wrap(getattr(loop, 'arg' + op_name)(self))
         return func_with_new_name(impl, "reduce_arg%s_impl" % op_name)
 
     descr_argmax = _reduce_argmax_argmin_impl("max")
diff --git a/pypy/module/micronumpy/loop.py b/pypy/module/micronumpy/loop.py
--- a/pypy/module/micronumpy/loop.py
+++ b/pypy/module/micronumpy/loop.py
@@ -209,8 +209,8 @@
             idx += 1
         return result
     return argmin_argmax
-argmin = _new_argmin_argmax('argmin')
-argmax = _new_argmin_argmax('argmax')
+argmin = _new_argmin_argmax('min')
+argmax = _new_argmin_argmax('max')
 
 # note that shapelen == 2 always
 dot_driver = jit.JitDriver(name = 'numpy_dot',
@@ -368,7 +368,7 @@
 
 fromstring_driver = jit.JitDriver(name = 'numpy_fromstring',
                                   greens = ['dtype'],
-                                  reds = ['s', 'ai', 'i'])
+                                  reds = ['i', 's', 'ai'])
 
 def fromstring_loop(a, dtype, itemsize, s):
     i = 0


More information about the pypy-commit mailing list