小编pac*_*ear的帖子

"OverflowError:Python int太大而无法转换为C long"在Windows上但不是mac

我在Windows和Mac上运行完全相同的代码,使用python 3.5 64位.

在Windows上,它看起来像这样:

>>> import numpy as np
>>> preds = np.zeros((1, 3), dtype=int)
>>> p = [6802256107, 5017549029, 3745804973]
>>> preds[0] = p
Traceback (most recent call last):
  File "<pyshell#13>", line 1, in <module>
    preds[0] = p
OverflowError: Python int too large to convert to C long
Run Code Online (Sandbox Code Playgroud)

但是,此代码在我的Mac上运行正常.任何人都可以帮助解释为什么或为Windows上的代码提供解决方案?非常感谢!

python windows int long-integer

21
推荐指数
3
解决办法
6万
查看次数

标签 统计

int ×1

long-integer ×1

python ×1

windows ×1