Author: Alex Gaynor <[email protected]>
Branch: numpy-dtype-refactor
Changeset: r49350:72d246a1c7a8
Date: 2011-11-11 18:20 -0500
http://bitbucket.org/pypy/pypy/changeset/72d246a1c7a8/

Log:    fix-ish, need to talk to fijal about why these mehods have different
        signatures than expected

diff --git a/pypy/module/micronumpy/compile.py 
b/pypy/module/micronumpy/compile.py
--- a/pypy/module/micronumpy/compile.py
+++ b/pypy/module/micronumpy/compile.py
@@ -177,10 +177,12 @@
 
     def execute(self, interp):
         arr = interp.variables[self.name]
-        w_index = self.index.execute(interp).eval(0)
-        w_val = self.expr.execute(interp).eval(0)
+        w_index = self.index.execute(interp)
+        assert isinstance(w_index, BaseArray)
+        w_val = self.expr.execute(interp)
+        assert isinstance(w_val, BaseArray)
         assert isinstance(arr, BaseArray)
-        arr.descr_setitem(interp.space, w_index, w_val)
+        arr.descr_setitem(interp.space, w_index.eval(0), w_val.eval(0))
 
     def __repr__(self):
         return "%s[%r] = %r" % (self.name, self.index, self.expr)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to