[pypy-commit] pypy numpy-back-to-applevel: merged upstream
alex_gaynor
noreply at buildbot.pypy.org
Thu Jan 26 22:35:49 CET 2012
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: numpy-back-to-applevel
Changeset: r51824:8fe3c92a0d5e
Date: 2012-01-26 16:34 -0500
http://bitbucket.org/pypy/pypy/changeset/8fe3c92a0d5e/
Log: merged upstream
diff --git a/pypy/module/micronumpy/interp_ufuncs.py b/pypy/module/micronumpy/interp_ufuncs.py
--- a/pypy/module/micronumpy/interp_ufuncs.py
+++ b/pypy/module/micronumpy/interp_ufuncs.py
@@ -272,7 +272,7 @@
else:
res_dtype = calc_dtype
if isinstance(w_obj, Scalar):
- return self.func(calc_dtype, w_obj.value.convert_to(calc_dtype))
+ return space.wrap(self.func(calc_dtype, w_obj.value.convert_to(calc_dtype)))
w_res = Call1(self.func, self.name, w_obj.shape, calc_dtype, res_dtype,
w_obj)
@@ -310,10 +310,10 @@
else:
res_dtype = calc_dtype
if isinstance(w_lhs, Scalar) and isinstance(w_rhs, Scalar):
- return self.func(calc_dtype,
+ return space.wrap(self.func(calc_dtype,
w_lhs.value.convert_to(calc_dtype),
w_rhs.value.convert_to(calc_dtype)
- )
+ ))
new_shape = shape_agreement(space, w_lhs.shape, w_rhs.shape)
w_res = Call2(self.func, self.name,
diff --git a/pypy/rpython/lltypesystem/rdict.py b/pypy/rpython/lltypesystem/rdict.py
--- a/pypy/rpython/lltypesystem/rdict.py
+++ b/pypy/rpython/lltypesystem/rdict.py
@@ -321,7 +321,8 @@
r_tuple = hop.r_result
cTUPLE = hop.inputconst(lltype.Void, r_tuple.lowleveltype)
hop.exception_is_here()
- return hop.gendirectcall(ll_popitem, cTUPLE, v_dict)
+ v_res = hop.gendirectcall(ll_popitem, cTUPLE, v_dict)
+ return self.recast_value(hop.llops, v_res)
def rtype_method_pop(self, hop):
if hop.nb_args == 2:
More information about the pypy-commit
mailing list