trouble with complex numbers

Dr. Phillip M. Feldman pfeldman at verizon.net
Wed Aug 5 02:28:29 EDT 2009


When I try to compute the phase of a complex number, I get an error message:

In [3]: from cmath import *
In [4]: x=1+1J
In [5]: phase(x)
<snip>
NameError: name 'phase' is not defined
<snip>
AttributeError: 'complex' object has no attribute 'phase'

Any advice will be appreciated.
-- 
View this message in context: http://www.nabble.com/trouble-with-complex-numbers-tp24821423p24821423.html
Sent from the Python - python-list mailing list archive at Nabble.com.




More information about the Python-list mailing list