我试图在python中计算泊松分布如下:
p = math.pow(3,idx)
depart = math.exp(-3) * p
depart = depart / math.factorial(idx)
Run Code Online (Sandbox Code Playgroud)
idx范围从0
但是我得到了 OverflowError: long int too large to convert to float
我试图将转换转换为float但没有结果.
我有一个如下所示的文件,我想删除第四列中没有任何值的行.
Experiment Replica Module Mean
General1 0 scenario.host[229].app
General1 1 scenario.host[229].app 0.00235355
General1 2 scenario.host[229].app
General1 3 scenario.host[229].app 0.0783413
General1 4 scenario.host[229].app
General3 0 scenario.host[229].app
General3 1 scenario.host[229].app 0.540335
General3 2 scenario.host[229].app
General3 3 scenario.host[229].app
General3 4 scenario.host[229].app
General1 0 scenario.host[229].app
Run Code Online (Sandbox Code Playgroud)