Skip to content

Commit

Permalink
reduce test warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenKlaassen committed Dec 11, 2023
1 parent 3044f5c commit ee04037
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doubleml/tests/test_did_external_predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def doubleml_did_fixture(did_score, dml_procedure, n_rep):
np.random.seed(3141)
dml_did_ext.fit(external_predictions=ext_predictions)

res_dict = {"coef_normal": dml_did.coef, "coef_ext": dml_did_ext.coef}
res_dict = {"coef_normal": dml_did.coef[0], "coef_ext": dml_did_ext.coef[0]}

return res_dict

Expand Down
2 changes: 1 addition & 1 deletion doubleml/tests/test_didcs_external_predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def doubleml_didcs_fixture(did_score, dml_procedure, n_rep):
np.random.seed(3141)
dml_did_cs_ext.fit(external_predictions=ext_predictions)

res_dict = {"coef_normal": dml_did_cs.coef, "coef_ext": dml_did_cs_ext.coef}
res_dict = {"coef_normal": dml_did_cs.coef[0], "coef_ext": dml_did_cs_ext.coef[0]}

return res_dict

Expand Down
2 changes: 1 addition & 1 deletion doubleml/tests/test_iivm_external_predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def adapted_doubleml_fixture(dml_procedure, n_rep):
np.random.seed(3141)
dml_iivm_ext.fit(external_predictions=ext_predictions)

res_dict = {"coef_normal": dml_iivm.coef, "coef_ext": dml_iivm_ext.coef}
res_dict = {"coef_normal": dml_iivm.coef[0], "coef_ext": dml_iivm_ext.coef[0]}

return res_dict

Expand Down
2 changes: 1 addition & 1 deletion doubleml/tests/test_lpq_external_predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def doubleml_lpq_fixture(dml_procedure, n_rep, normalize_ipw):
np.random.seed(3141)
dml_lpq_ext.fit(external_predictions=ext_predictions)

res_dict = {"coef_normal": dml_lpq.coef, "coef_ext": dml_lpq_ext.coef}
res_dict = {"coef_normal": dml_lpq.coef[0], "coef_ext": dml_lpq_ext.coef[0]}

return res_dict

Expand Down
2 changes: 1 addition & 1 deletion doubleml/tests/test_pliv_external_predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def adapted_doubleml_fixture(score, dml_procedure, n_rep, dim_z):
np.random.seed(3141)
dml_pliv_ext.fit(external_predictions=ext_predictions)

res_dict = {"coef_normal": dml_pliv.coef, "coef_ext": dml_pliv_ext.coef}
res_dict = {"coef_normal": dml_pliv.coef[0], "coef_ext": dml_pliv_ext.coef[0]}

return res_dict

Expand Down
2 changes: 1 addition & 1 deletion doubleml/tests/test_plr_external_predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def doubleml_plr_fixture(plr_score, dml_procedure, n_rep, set_ml_m_ext, set_ml_l
np.random.seed(3141)
dml_plr_ext.fit(external_predictions=ext_predictions)

res_dict = {"coef_normal": dml_plr.coef, "coef_ext": dml_plr_ext.coef}
res_dict = {"coef_normal": dml_plr.coef[0], "coef_ext": dml_plr_ext.coef[0]}

return res_dict

Expand Down
2 changes: 1 addition & 1 deletion doubleml/tests/test_pq_external_predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def doubleml_pq_fixture(dml_procedure, n_rep, normalize_ipw, set_ml_m_ext, set_m
tol_rel = 1e-9
tol_abs = 1e-4

res_dict = {"coef_normal": dml_pq.coef, "coef_ext": dml_pq_ext.coef, "tol_rel": tol_rel, "tol_abs": tol_abs}
res_dict = {"coef_normal": dml_pq.coef[0], "coef_ext": dml_pq_ext.coef[0], "tol_rel": tol_rel, "tol_abs": tol_abs}

return res_dict

Expand Down

0 comments on commit ee04037

Please sign in to comment.