概述
运行代码:
报错:
ComplexWarning: Casting complex values to real discards the imaginary part
(将复数转换为实数丢弃虚部)
原因:
a是int32,能表示的最大数是2**32-1,而10**10显然超出这个范围;
原文地址:
https://stackoverflow.com/questions/7559595/python-runtimewarning-overflow-encountered-in-long-scalars
总结
以上是编程之家为你收集整理的【Python报错】ComplexWarning: Casting complex values to real discards the imaginary part全部内容,希望文章能够帮你解决【Python报错】ComplexWarning: Casting complex values to real discards the imaginary part所遇到的程序开发问题。
如果您也喜欢它,动动您的小指点个赞吧