numpy.polysub
-
numpy.polysub(a1, a2)
[source] -
Difference (subtraction) of two polynomials.
Given two polynomials
a1
anda2
, returnsa1 - a2
.a1
anda2
can be either array_like sequences of the polynomials’ coefficients (including coefficients equal to zero), orpoly1d
objects.- Parameters
-
-
a1, a2array_like or poly1d
-
Minuend and subtrahend polynomials, respectively.
-
- Returns
-
-
outndarray or poly1d
-
Array or
poly1d
object of the difference polynomial’s coefficients.
-
Examples
>>> np.polysub([2, 10, -2], [3, 10, -4]) array([-1, 0, 2])
© 2005–2020 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.19/reference/generated/numpy.polysub.html