math.exp(complex)

John J. Lee jjl at pobox.com
Sun Sep 21 22:32:10 CEST 2003


David Eppstein <eppstein at ics.uci.edu> writes:

> Why doesn't this work?
> 
> >>> import math
> >>> math.exp(1j*math.pi)
> Traceback (most recent call last):
[...]
> So why not math.exp(complex)?

import cmath as math

:-)


John




More information about the Python-list mailing list