Let's give some usage examples.
First, we create a polynomial instance from the given interpolation points:
p = PolyNomial(points=[(1,0),(2,3),(3,8)])
The polynomial's coefficients with respect to the monomial basis are available as an attribute of p:
p.coeff # returns array([ 1., 0., -1.]) (rounded)
This corresponds to the polynomial . The default plot of the polynomial, obtained by p.plot((-3.5,3.5)), results in the following figure (Figure 19.1):
Figure 19.1: Result of the polynomial plot method
Finally, we compute the zeros of the polynomial, which in this case are two real numbers:
pz = p.zeros() # returns array([-1.+0.j, 1.+0.j])
The result can be verified by evaluating the polynomial at these points:
p(pz) # returns array([0.+0.j, 0.+0.j])