I am trying to obtain the gumbel_r of this input list using gumbel_r.fit() and gumbel_r.ppf()
contoh1 = pd.read_excel('data.xlsx',header=None,sheet_name='Sheet7'
dn=contoh1.columns
y1 =contoh1[dn[1]][37:43]
y2 =contoh1[dn[2]][21:43]
y3 =contoh1[dn[3]][21:43]
y4 =contoh1[dn[4]][1:43]
y5 =contoh1[dn[5]][22:44]
gmb=[y1,y2,y3,y4,y5]
To obtain that output I used the code (it goes through a loop)
ch_res={}
parameter_9={}
Rx_9={}
Fx_9 = 0.5
for i in range (len(gmb)):
ch_res[i] = np.array(gmb,dtype=object)
parameter_9[i]= gumbel_r.fit(ch_res[i])
Rx_9[i]= gumbel_r.ppf(Fx_9,*parameter_9[i])
but i got the attribute error when i run parameter_9[i] it says 'float' object has no attribute 'sqrt'. please help me what should i do about the code
Not all functions in SciPy are designed to handle
objectarrays. Instead of creatingobjectarrays to pass togumbel_r.fit(), create arrays ofnumpy.float64. Change this line:to
Actually, I think that should be