Comprehensive Examples

In this chapter, we will present some comprehensive and longer examples together with a brief introduction to the theoretical background and the examples' complete implementation. Here, we want to show you how the concepts defined in this book are used in practice.

The following topics are covered in this chapter:

  • Polynomials 
  • The polynomial class
  • Spectral clustering
  • Solving initial value problems

19.1 Polynomials

First, we will demonstrate the power of the Python constructs presented so far by designing a class for polynomials. 

Note that this class differs conceptually from the class numpy.poly1d.

 We will give some theoretical background, which will lead us to a list of requirements, and then we will give the code, ...

Get Scientific Computing with Python - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.