Author: mattip <[email protected]>
Branch: numpypy-complex2
Changeset: r56837:30d1879c3c04
Date: 2012-08-24 13:45 +0300
http://bitbucket.org/pypy/pypy/changeset/30d1879c3c04/

Log:    do not demote complex to float

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
@@ -444,6 +444,7 @@
     long_dtype = interp_dtype.get_dtype_cache(space).w_longdtype
     int64_dtype = interp_dtype.get_dtype_cache(space).w_int64dtype
     complex_type = interp_dtype.get_dtype_cache(space).w_complex128dtype
+    float_type = interp_dtype.get_dtype_cache(space).w_float64dtype
 
     if isinstance(w_obj, interp_boxes.W_GenericBox):
         dtype = w_obj.get_dtype(space)
@@ -468,7 +469,7 @@
     elif space.isinstance_w(w_obj, space.w_complex):
         if (current_guess is None or current_guess is bool_dtype or
             current_guess is long_dtype or current_guess is int64_dtype or
-            current_guess is complex_type):
+            current_guess is complex_type or current_guess is float_type):
             return complex_type
         return current_guess
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to