Skip to content

Commit 0943d81

Browse files
Merge pull request #529 from thomasaarholt/patch-1
Fix PyMC3 warnings in Chapter 1
2 parents 4854bc6 + 791786f commit 0943d81

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: Chapter1_Introduction/Ch1_Introduction_PyMC3.ipynb

+2-3
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
"\n",
210210
"# For the already prepared, I'm using Binomial's conj. prior.\n",
211211
"for k, N in enumerate(n_trials):\n",
212-
" sx = plt.subplot(len(n_trials)/2, 2, k+1)\n",
212+
" sx = plt.subplot(len(n_trials)//2, 2, k+1)\n",
213213
" plt.xlabel(\"$p$, probability of heads\") \\\n",
214214
" if k in [0, len(n_trials)-1] else None\n",
215215
" plt.setp(sx.get_yticklabels(), visible=False)\n",
@@ -650,7 +650,6 @@
650650
],
651651
"source": [
652652
"import pymc3 as pm\n",
653-
"import theano.tensor as tt\n",
654653
"\n",
655654
"with pm.Model() as model:\n",
656655
" alpha = 1.0/count_data.mean() # Recall count_data is the\n",
@@ -730,7 +729,7 @@
730729
"### Mysterious code to be explained in Chapter 3.\n",
731730
"with model:\n",
732731
" step = pm.Metropolis()\n",
733-
" trace = pm.sample(10000, tune=5000,step=step)"
732+
" trace = pm.sample(10000, tune=5000, step=step, return_inferencedata=False)"
734733
]
735734
},
736735
{

0 commit comments

Comments
 (0)