运行代码:
报错:
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所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)