Skip to content

Commit 7d24cd8

Browse files
committed
fix notebook warnings
1 parent 6dd4503 commit 7d24cd8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

doc/examples/py_double_ml_did.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@
181181
"\n",
182182
" ATTE_estimates[i_rep] = dml_did.coef\n",
183183
" confint = dml_did.confint(level=0.95)\n",
184-
" coverage [i_rep] = (confint['2.5 %'] <= ATTE) & (ATTE <= confint['97.5 %'])\n",
185-
" ci_length[i_rep] = confint['97.5 %'] - confint['2.5 %']"
184+
" coverage [i_rep] = (confint['2.5 %'].iloc[0] <= ATTE) & (ATTE <= confint['97.5 %'].iloc[0])\n",
185+
" ci_length[i_rep] = confint['97.5 %'].iloc[0] - confint['2.5 %'].iloc[0]"
186186
]
187187
},
188188
{
@@ -384,8 +384,8 @@
384384
"\n",
385385
" ATTE_estimates[i_rep] = dml_did.coef\n",
386386
" confint = dml_did.confint(level=0.95)\n",
387-
" coverage [i_rep] = (confint['2.5 %'] <= ATTE) & (ATTE <= confint['97.5 %'])\n",
388-
" ci_length[i_rep] = confint['97.5 %'] - confint['2.5 %']"
387+
" coverage [i_rep] = (confint['2.5 %'].iloc[0] <= ATTE) & (ATTE <= confint['97.5 %'].iloc[0])\n",
388+
" ci_length[i_rep] = confint['97.5 %'].iloc[0] - confint['2.5 %'].iloc[0]"
389389
]
390390
},
391391
{

doc/examples/py_double_ml_learner.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
" rmses_ml_g1[i_rep, i_learners] = dml_irm.rmses['ml_g1']\n",
125125
"\n",
126126
" confint = dml_irm.confint()\n",
127-
" coverage[i_rep, i_learners] = (confint['2.5 %'] <= theta) & (confint['97.5 %'] >= theta)\n",
127+
" coverage[i_rep, i_learners] = (confint['2.5 %'].iloc[0] <= theta) & (confint['97.5 %'].iloc[0]s >= theta)\n",
128128
"\n",
129129
"print(f'\\nCoverage: {coverage.mean(0)}')"
130130
]
@@ -446,7 +446,7 @@
446446
"name": "python",
447447
"nbconvert_exporter": "python",
448448
"pygments_lexer": "ipython3",
449-
"version": "3.10.8"
449+
"version": "3.10.10"
450450
},
451451
"orig_nbformat": 4
452452
},

0 commit comments

Comments
 (0)