# Matplotlib compatibility patch for Pyodide
import matplotlib
if not hasattr(matplotlib.RcParams, "_get"):
matplotlib.RcParams._get = dict.get
5. Object-oriented programming#
Attribution
This chapter reuses material from Learn Programming for Engineers. Find out more here.
In this chapter, you’ll learn about the fundamental concepts of classes and object-oriented programming (OOP) in Python as well as the key principles of encapsulation, inheritance, and polymorphism in OOP. This knowledge will enable you to better understand and use the classes that are everywhere in Python packages. For example, the class rv_continuous in scipy.stats, which is used for defining probability distributions, are used heavily in MUDE! For non-probability topics, this will help you recognize why objects in Python packages like Numpy have syntax like object.mean() or object.shape.