-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Open
Description
In Chapter 1 (Ch1_Introduction_PyMC2.ipynb) there's a type error in the first coin flipping algorithm (Example: Mandatory coin-flip example) at line:
sx = plt.subplot(len(n_trials) / 2, 2, k + 1)
inside the for-cycle.
The operation len(n_trials) / 2
gives back a float and not an integer (at least in the current version of Colab).
It can be fixed by adding int()
:
sx = plt.subplot(int(len(n_trials) / 2), 2, k + 1)
Edit:
Or more simply with len(n_trials) // 2
as Lucian Sasu suggested:
sx = plt.subplot(len(n_trials) // 2, 2, k + 1)
Metadata
Metadata
Assignees
Labels
No labels