python 不支持复数转换为整数或浮点数
>>>float(4.5+0j)
Traceback(most recent call last):
File"", line 1,in
float(4.5+0j)
TypeError: can't convert complex to float
>>> int(4+0j)
Traceback (most recent call last):
File "", line 1, in
int(4+0j)
TypeError: can't convert complex to int
>>>