numpy.
polysub
Difference (subtraction) of two polynomials.
Note
This forms part of the old polynomial API. Since version 1.4, the new polynomial API defined in numpy.polynomial is preferred. A summary of the differences can be found in the transition guide.
numpy.polynomial
Given two polynomials a1 and a2, returns a1 - a2. a1 and a2 can be either array_like sequences of the polynomials’ coefficients (including coefficients equal to zero), or poly1d objects.
a1 - a2
poly1d
Minuend and subtrahend polynomials, respectively.
Array or poly1d object of the difference polynomial’s coefficients.
See also
polyval
polydiv
polymul
polyadd
Examples
>>> np.polysub([2, 10, -2], [3, 10, -4]) array([-1, 0, 2])