OpenSourceEconomics / grmpy

Python package for the simulation and estimation of generalized Roy model
http://grmpy.readthedocs.io
MIT License
19 stars 5 forks source link

multiple warnings during py.test run #151

Closed peisenha closed 6 years ago

peisenha commented 6 years ago

========================================================================= warnings summary ========================================================================== /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix() /home/peisenha/.local/lib/anaconda3/envs/grmpy/lib/python3.6/site-packages/statsmodels/regression/linear_model.py:1510: RuntimeWarning: divide by zero encountered in double_scalars return np.dot(wresid, wresid) / self.df_resid /home/peisenha/.local/lib/anaconda3/envs/grmpy/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1735: RuntimeWarning: invalid value encountered in true_divide x = np.asarray((x - loc)/scale, dtype=dtyp) /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/estimate/estimate_auxiliary.py:139: RuntimeWarning: invalid value encountered in multiply contrib = (1.0 / sd) dist_1 dist_2 /home/peisenha/.local/lib/anaconda3/envs/grmpy/lib/python3.6/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in cdouble_scalars ret = ret.dtype.type(ret / rcount) /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:50: RuntimeWarning: covariance is not symmetric positive-semidefinite. U = np.random.multivariate_normal(np.zeros(3), cov, num_agents) /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/estimate/estimate_auxiliary.py:295: RuntimeWarning: invalid value encountered in sqrt se = np.sqrt(np.diag(hess_inv) / data_frame.shape[0])

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix() /home/peisenha/.local/lib/anaconda3/envs/grmpy/lib/python3.6/site-packages/statsmodels/regression/linear_model.py:1510: RuntimeWarning: invalid value encountered in double_scalars return np.dot(wresid, wresid) / self.df_resid /home/peisenha/.local/lib/anaconda3/envs/grmpy/lib/python3.6/site-packages/statsmodels/regression/linear_model.py:1510: RuntimeWarning: divide by zero encountered in double_scalars return np.dot(wresid, wresid) / self.df_resid

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

/home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:61: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. Z = X[[i - 1 for i in init_dict['CHOICE']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:62: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_treated = X[[i - 1 for i in init_dict['TREATED']['order']]].as_matrix() /home/peisenha/external_storage/ownCloud/office/workspace/OpenSourceEconomics/grmpy/grmpy/simulate/simulate_auxiliary.py:63: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. X_untreated = X[[i - 1 for i in init_dict['UNTREATED']['order']]].as_matrix()

-- Docs: https://docs.pytest.org/en/latest/warnings.html ============================================================= 22 passed, 53 warnings in 416.70 seconds ==============================================================

SeBecker commented 6 years ago

I fixed this by implementing the suggested method instead of .as_matrix()