我可以在python中计算exp(1 + 2j)吗?
exp(1+2j) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: can't convert complex to float
您需要此功能的复杂版本:
cmath.exp(1+2j)
参见http://docs.python.org/library/cmath.html