#11962: mpc won't coerce to ComplexNumber
-----------------------------+----------------------------------------------
   Reporter:  dsm            |          Owner:  tbd       
       Type:  defect         |         Status:  new       
   Priority:  major          |      Milestone:  sage-4.7.3
  Component:  PLEASE CHANGE  |       Keywords:            
Work_issues:                 |       Upstream:  N/A       
   Reviewer:                 |         Author:            
     Merged:                 |   Dependencies:            
-----------------------------+----------------------------------------------
 Came across this working on #1173:

 {{{
 sage: version()
 'Sage Version 4.7.2.alpha3, Release Date: 2011-09-28'
 sage: import mpmath
 sage:
 sage: z = mpmath.mpf(2)
 sage: z
 mpf('2.0')
 sage: RR(z)
 2.00000000000000
 sage: CC(z)
 2.00000000000000
 sage:
 sage: z = mpmath.mpc(2,3)
 sage: z
 mpc(real='2.0', imag='3.0')
 sage: complex(z)
 (2+3j)
 sage: CC(z)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 [...]
 TypeError: unable to coerce to a ComplexNumber: <type
 'sage.libs.mpmath.ext_main.mpc'>
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11962>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to