Author: Justin Peel <[email protected]>
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)
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to