Python:RuntimeWarning:用double_scalars除以零

时间:2019-01-14 11:23:18

标签: python

我的代码如下:

> Task :run FAILED
Error occurred during initialization of boot layer
java.lang.module.ResolutionException: Modules proto.google.common.protos 
and gax.grpc export package com.google.longrunning to module 
javafx.graphicsEmpty

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'' finished with non-zero exit value 1

我在for index, row in dfspread.iterrows(): if row['Bin'] == 'A': max_exp = [] gammastar = [] for idx,rw in df_b.iterrows(): exp = rw['Proba-a']*(rw['gamma']*row['spread']*(1+f)-(f+f)) max_exp.append(float(exp)) exp_gain_max = max(max_exp) gammastar = ((exp_gain_max) + f+f)/(rw['Proba-a']*row['spread']*(1+f)) dfspread.at[index,'gamma*']= gammastar 行有错误,exp_gain_max是一个数字,例如:7.560439039725613e-10,f = 0.00000001,价差= 0.003,proba-a是一个数字,例如0.0045。知道为什么我经常遇到这个问题吗?谢谢!

0 个答案:

没有答案