numpy.polynomial.polynomial.polytrim()

numpy.polynomial.polynomial.polytrim(c, tol=0) [source] Remove ?small? ?trailing? coefficients from a polynomial. ?Small? means ?small in absolute value? and is controlled by the parameter tol; ?trailing? means highest order coefficient(s), e.g., in [0, 1, 1, 0, 0] (which represents 0 + x + x**2 + 0*x**3 + 0*x**4) both the 3-rd and 4-th order coefficients would be ?trimmed.? Parameters: c : array_like 1-d array of coefficients, ordered from lowest order to highest. tol : number, optional

numpy.polynomial.polynomial.polysub()

numpy.polynomial.polynomial.polysub(c1, c2) [source] Subtract one polynomial from another. Returns the difference of two polynomials c1 - c2. The arguments are sequences of coefficients from lowest order term to highest, i.e., [1,2,3] represents the polynomial 1 + 2*x + 3*x**2. Parameters: c1, c2 : array_like 1-D arrays of polynomial coefficients ordered from low to high. Returns: out : ndarray Of coefficients representing their difference. See also polyadd, polymul, polydiv, polyp

numpy.polynomial.polynomial.polyroots()

numpy.polynomial.polynomial.polyroots(c) [source] Compute the roots of a polynomial. Return the roots (a.k.a. ?zeros?) of the polynomial Parameters: c : 1-D array_like 1-D array of polynomial coefficients. Returns: out : ndarray Array of the roots of the polynomial. If all the roots are real, then out is also real, otherwise it is complex. See also chebroots Notes The root estimates are obtained as the eigenvalues of the companion matrix, Roots far from the origin of the comple

numpy.polynomial.polynomial.polypow()

numpy.polynomial.polynomial.polypow(c, pow, maxpower=None) [source] Raise a polynomial to a power. Returns the polynomial c raised to the power pow. The argument c is a sequence of coefficients ordered from low to high. i.e., [1,2,3] is the series 1 + 2*x + 3*x**2. Parameters: c : array_like 1-D array of array of series coefficients ordered from low to high degree. pow : integer Power to which the series will be raised maxpower : integer, optional Maximum power allowed. This is mainly

numpy.polynomial.polynomial.polyone

numpy.polynomial.polynomial.polyone = array([1])

numpy.polynomial.polynomial.Polynomial()

class numpy.polynomial.polynomial.Polynomial(coef, domain=None, window=None) [source] A power series class. The Polynomial class provides the standard Python numerical methods ?+?, ?-?, ?*?, ?//?, ?%?, ?divmod?, ?**?, and ?()? as well as the attributes and methods listed in the ABCPolyBase documentation. Parameters: coef : array_like Polynomial coefficients in order of increasing degree, i.e., (1, 2, 3) give 1 + 2*x + 3*x**2. domain : (2,) array_like, optional Domain to use. The interva

numpy.polynomial.polynomial.polymulx()

numpy.polynomial.polynomial.polymulx(c) [source] Multiply a polynomial by x. Multiply the polynomial c by x, where x is the independent variable. Parameters: c : array_like 1-D array of polynomial coefficients ordered from low to high. Returns: out : ndarray Array representing the result of the multiplication. Notes New in version 1.5.0.

numpy.polynomial.polynomial.polymul()

numpy.polynomial.polynomial.polymul(c1, c2) [source] Multiply one polynomial by another. Returns the product of two polynomials c1 * c2. The arguments are sequences of coefficients, from lowest order term to highest, e.g., [1,2,3] represents the polynomial 1 + 2*x + 3*x**2. Parameters: c1, c2 : array_like 1-D arrays of coefficients representing a polynomial, relative to the ?standard? basis, and ordered from lowest order term to highest. Returns: out : ndarray Of the coefficients of t

numpy.polynomial.polynomial.polyline()

numpy.polynomial.polynomial.polyline(off, scl) [source] Returns an array representing a linear polynomial. Parameters: off, scl : scalars The ?y-intercept? and ?slope? of the line, respectively. Returns: y : ndarray This module?s representation of the linear polynomial off + scl*x. See also chebline Examples >>> from numpy.polynomial import polynomial as P >>> P.polyline(1,-1) array([ 1, -1]) >>> P.polyval(1, P.polyline(1,-1)) # should be 0 0.0

numpy.polynomial.polynomial.polyint()

numpy.polynomial.polynomial.polyint(c, m=1, k=[], lbnd=0, scl=1, axis=0) [source] Integrate a polynomial. Returns the polynomial coefficients c integrated m times from lbnd along axis. At each iteration the resulting series is multiplied by scl and an integration constant, k, is added. The scaling factor is for use in a linear change of variable. (?Buyer beware?: note that, depending on what one is doing, one may want scl to be the reciprocal of what one might expect; for more information,