CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.51k stars 7.84k forks source link

fix: Subplot in Chapter 1 gives Matplotlib warning #518

Open kevinalh opened 3 years ago

kevinalh commented 3 years ago

Fix a Matplotlib 3.3 deprecation warning in the beginning of the Chapter 1 notebooks.

The exact warning is:

MatplotlibDeprecationWarning: Passing non-integers as three-element position specification is deprecated since 3.3 and will be removed two minor releases later.

image

The simple fix is done by using floor division with // so that the type is int and not float. Since it's the first chapter it's particularly important to keep it clean.