Returns the quotient and remainder of polynomial division.
The input arrays specify the polynomial terms in turn with a length equal to the polynomial degree plus 1.
Parameters: | u : {array_like, poly1d}
v : {array_like, poly1d}
|
---|---|
Returns: | q : ndarray
r : ndarray
|
Examples
>>> x = np.array([3.0, 5.0, 2.0])
>>> y = np.array([2.0, 1.0])
>>> np.polydiv(x, y)
>>> (array([ 1.5 , 1.75]), array([ 0.25]))