[pypy-commit] pypy numpy-dtype-refactor: fix-ish, need to talk to fijal about why these mehods have different signatures than expected
alex_gaynor
noreply at buildbot.pypy.org
Sat Nov 12 01:07:36 CET 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
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)
More information about the pypy-commit
mailing list