Skip to content

Commit 2db2762

Browse files
committed
supress FutureWarning
1 parent 29d4c6c commit 2db2762

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

docs/source/notebooks/did_pymc_banks.ipynb

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
"metadata": {},
1717
"outputs": [],
1818
"source": [
19+
"import warnings\n",
20+
"\n",
1921
"import arviz as az\n",
2022
"import pandas as pd\n",
2123
"\n",
@@ -31,7 +33,8 @@
3133
"%load_ext autoreload\n",
3234
"%autoreload 2\n",
3335
"%config InlineBackend.figure_format = 'retina'\n",
34-
"seed = 42"
36+
"seed = 42\n",
37+
"warnings.simplefilter(action=\"ignore\", category=FutureWarning)"
3538
]
3639
},
3740
{
@@ -117,14 +120,6 @@
117120
"execution_count": 5,
118121
"metadata": {},
119122
"outputs": [
120-
{
121-
"name": "stderr",
122-
"output_type": "stream",
123-
"text": [
124-
"/var/folders/r0/nf1kgxsx6zx3rw16xc3wnnzr0000gn/T/ipykernel_542/1357227858.py:25: FutureWarning: Downcasting behavior in `replace` is deprecated and will be removed in a future version. To retain the old behavior, explicitly call `result.infer_objects(copy=False)`. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)`\n",
125-
" df_long = df_long.replace({\"district\": {\"Sixth District\": 1, \"Eighth District\": 0}})\n"
126-
]
127-
},
128123
{
129124
"data": {
130125
"text/html": [
@@ -371,7 +366,7 @@
371366
{
372367
"data": {
373368
"application/vnd.jupyter.widget-view+json": {
374-
"model_id": "ff04eb755c5a4b3799f9357b391b95c6",
369+
"model_id": "157d55ed720c45048f1f3b9ec64f1633",
375370
"version_major": 2,
376371
"version_minor": 0
377372
},
@@ -548,7 +543,7 @@
548543
{
549544
"data": {
550545
"application/vnd.jupyter.widget-view+json": {
551-
"model_id": "1c73d88ba42d4bc58597e27f4130346b",
546+
"model_id": "e55e1b5eec744b3ab83eb01ce5cd778c",
552547
"version_major": 2,
553548
"version_minor": 0
554549
},
@@ -573,7 +568,7 @@
573568
"name": "stderr",
574569
"output_type": "stream",
575570
"text": [
576-
"Sampling 4 chains for 1_000 tune and 1_000 draw iterations (4_000 + 4_000 draws total) took 2 seconds.\n",
571+
"Sampling 4 chains for 1_000 tune and 1_000 draw iterations (4_000 + 4_000 draws total) took 1 seconds.\n",
577572
"Sampling: [beta, sigma, y_hat]\n",
578573
"Sampling: [y_hat]\n",
579574
"Sampling: [y_hat]\n",
@@ -717,7 +712,7 @@
717712
{
718713
"data": {
719714
"application/vnd.jupyter.widget-view+json": {
720-
"model_id": "a602258c8e4745d78b52f86f3da22766",
715+
"model_id": "2765ee0006c8440983f9dcfa938bea5c",
721716
"version_major": 2,
722717
"version_minor": 0
723718
},
@@ -880,7 +875,7 @@
880875
{
881876
"data": {
882877
"application/vnd.jupyter.widget-view+json": {
883-
"model_id": "9713a99c6b7049359c1a16793145ca46",
878+
"model_id": "dd5a6855e8034f63961ddd55c6e23e13",
884879
"version_major": 2,
885880
"version_minor": 0
886881
},

0 commit comments

Comments
 (0)