[pypy-commit] pypy numpypy.float16: fix promotion of UInt64 -> Float64, obscure use of indexes in builtin_types

mattip noreply at buildbot.pypy.org
Mon Oct 29 05:05:12 CET 2012


Author: mattip <matti.picus at gmail.com>
Branch: numpypy.float16
Changeset: r58551:935d79f359c2
Date: 2012-10-29 05:40 +0200
http://bitbucket.org/pypy/pypy/changeset/935d79f359c2/

Log:	fix promotion of UInt64 -> Float64, obscure use of indexes in
	builtin_types

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
@@ -407,7 +407,7 @@
         dtypenum = dt2.num + 1
         # UInt64 + signed = Float64
         if dt2.num == 10:
-            dtypenum += 1
+            dtypenum += 2
     newdtype = interp_dtype.get_dtype_cache(space).builtin_dtypes[dtypenum]
 
     if (newdtype.itemtype.get_element_size() > dt2.itemtype.get_element_size() or


More information about the pypy-commit mailing list