[pypy-commit] pypy fix-result-types: fix

rlamy noreply at buildbot.pypy.org
Tue May 19 18:31:10 CEST 2015


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: fix-result-types
Changeset: r77394:663c18261251
Date: 2015-05-19 03:19 +0100
http://bitbucket.org/pypy/pypy/changeset/663c18261251/

Log:	fix

diff --git a/pypy/module/micronumpy/ufuncs.py b/pypy/module/micronumpy/ufuncs.py
--- a/pypy/module/micronumpy/ufuncs.py
+++ b/pypy/module/micronumpy/ufuncs.py
@@ -556,7 +556,6 @@
 
     @jit.unroll_safe
     def call(self, space, args_w, sig, casting, extobj):
-        w_obj = args_w[0]
         if len(args_w) > 2:
             [w_lhs, w_rhs, out] = args_w
             if space.is_none(out):
@@ -665,7 +664,8 @@
     def _calc_dtype(self, space, l_dtype, r_dtype, out=None, casting='unsafe'):
         use_min_scalar = False
         if l_dtype.is_object() or r_dtype.is_object():
-            return l_dtype, l_dtype
+            dtype = get_dtype_cache(space).w_objectdtype
+            return dtype, dtype
         in_casting = safe_casting_mode(casting)
         for dt_in, dt_out in self.allowed_types(space):
             if use_min_scalar:


More information about the pypy-commit mailing list