Feb-10-2018, 07:24 PM
Quote:def mepdf(MF,l): def pdf(X): for i in range(0,l.size): Y[:,i]= MF[i](X) Here i have the problem that this code is from R and there is : MF[[i]](x)...i don't know how i can do it in Python I am really sure that my way is wrong np.exp(l * Y.T) break return X return mepdf(MF,l)
Like this?
def mepdf(MF,l): for i in range(0,l.size): Y[:,i]= MF[i](X) np.exp(l * Y.T) break return X