From 6431558b2e9a7872172f24336cfe27df335b4bce Mon Sep 17 00:00:00 2001 From: Thomas Aarholt Date: Fri, 3 Sep 2021 10:58:06 +0200 Subject: [PATCH 1/3] Fix MatplotlibDeprecationWarning MatplotlibDeprecationWarning: Passing non-integers as three-element position specification is deprecated since 3.3 and will be removed two minor releases later. --- Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb b/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb index be24102a..f13a04fd 100644 --- a/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb +++ b/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb @@ -209,7 +209,7 @@ "\n", "# For the already prepared, I'm using Binomial's conj. prior.\n", "for k, N in enumerate(n_trials):\n", - " sx = plt.subplot(len(n_trials)/2, 2, k+1)\n", + " sx = plt.subplot(len(n_trials)//2, 2, k+1)\n", " plt.xlabel(\"$p$, probability of heads\") \\\n", " if k in [0, len(n_trials)-1] else None\n", " plt.setp(sx.get_yticklabels(), visible=False)\n", From 8305f5ee78b60a115fc5f7b20897a46243b2435a Mon Sep 17 00:00:00 2001 From: Thomas Aarholt Date: Fri, 3 Sep 2021 11:04:16 +0200 Subject: [PATCH 2/3] Fix Futurewarning specifying argument for pymc v3, not v4 --- Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb b/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb index f13a04fd..9c01e6df 100644 --- a/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb +++ b/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb @@ -730,7 +730,7 @@ "### Mysterious code to be explained in Chapter 3.\n", "with model:\n", " step = pm.Metropolis()\n", - " trace = pm.sample(10000, tune=5000,step=step)" + " trace = pm.sample(10000, tune=5000, step=step, return_inferencedata=False)" ] }, { From 791786fdc0b3e428aa12805a3c02f960fdbfb802 Mon Sep 17 00:00:00 2001 From: Thomas Aarholt Date: Fri, 3 Sep 2021 11:07:10 +0200 Subject: [PATCH 3/3] Remove unused theano import --- Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb | 1 - 1 file changed, 1 deletion(-) diff --git a/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb b/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb index 9c01e6df..abcb7243 100644 --- a/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb +++ b/Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb @@ -650,7 +650,6 @@ ], "source": [ "import pymc3 as pm\n", - "import theano.tensor as tt\n", "\n", "with pm.Model() as model:\n", " alpha = 1.0/count_data.mean() # Recall count_data is the\n",