[pypy-commit] pypy default: fixed dot and argmax/min jit

justinpeel noreply at buildbot.pypy.org
Tue Jul 12 00:59:44 CEST 2011


Author: Justin Peel <notmuchtotell at gmail.com>
Branch: 
Changeset: r45489:b8b3d24c83ab
Date: 2011-07-11 16:59 -0600
http://bitbucket.org/pypy/pypy/changeset/b8b3d24c83ab/

Log:	fixed dot and argmax/min jit

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
@@ -183,7 +183,7 @@
 
     def _reduce_argmax_argmin_impl(function):
         reduce_driver = jit.JitDriver(greens=['signature'],
-                         reds = ['i', 'size', 'self', 'result'])
+                         reds = ['i', 'size', 'result', 'self'])
         def loop(self, size):
             result = 0
             cur_best = self.eval(0)
@@ -258,7 +258,9 @@
 
     def descr_dot(self, space, w_other):
         if isinstance(w_other, BaseArray):
-            return self.descr_mul(space, w_other).descr_sum(space)
+            w_res = self.descr_mul(space, w_other)
+            assert isinstance(w_res, BaseArray)
+            return w_res.descr_sum(space)
         else:
             return self.descr_mul(space, w_other)
 


More information about the pypy-commit mailing list