2
我試圖讓Python中的模型的經濟學論文,並在計算功能:可見棄用警告的Python
elif wage_online == max(wages):
# after going to online you get the highest wage after cost of education
learning_benefit = int(np.int((1 + gamma_online_learning) * x[0]) * exp(np.int(bivariate_distribution[x[0] - 1, x[1] - 1])))
social_benefit = int(((1 + gamma_online_social) * np.int(x[1])) * exp(np.int(bivariate_distribution[x[0] - 1, x[1] - 1])))
sigma_social.append(social_benefit)
sigma_learning.append(learning_benefit)
我收到以下錯誤
/Users/sa/Documents/Dissertation/first_defiation.py:160: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
learning_benefit = int(np.int((1 + gamma_online_learning) * x[0]) * exp(np.int(bivariate_distribution[x[0] - 1, x[1] - 1])))
我試圖解決這個問題通過將exp函數中的值包含爲np.int,但無濟於事。有誰知道警告來自哪個變量?
我猜這個問題與'bivariate_distribution'的輸入有關。這是什麼包?需要什麼類型的輸入?什麼是'x'? – hpaulj
爲每個涉及的變量檢查'type(variable_name)'。這將縮小這個問題的範圍。 –