numpy.polynomial.polynomial.polygrid3d()

numpy.polynomial.polynomial.polygrid3d(x, y, z, c) [source] Evaluate a 3-D polynomial on the Cartesian product of x, y and z. This function returns the values: where the points (a, b, c) consist of all triples formed by taking a from x, b from y, and c from z. The resulting points form a grid with x in the first dimension, y in the second, and z in the third. The parameters x, y, and z are converted to arrays only if they are tuples or a lists, otherwise they are treated as a scalars. In

numpy.polynomial.polynomial.polygrid2d()

numpy.polynomial.polynomial.polygrid2d(x, y, c) [source] Evaluate a 2-D polynomial on the Cartesian product of x and y. This function returns the values: where the points (a, b) consist of all pairs formed by taking a from x and b from y. The resulting points form a grid with x in the first dimension and y in the second. The parameters x and y are converted to arrays only if they are tuples or a lists, otherwise they are treated as a scalars. In either case, either x and y or their eleme

numpy.polynomial.polynomial.polyfromroots()

numpy.polynomial.polynomial.polyfromroots(roots) [source] Generate a monic polynomial with given roots. Return the coefficients of the polynomial where the r_n are the roots specified in roots. If a zero has multiplicity n, then it must appear in roots n times. For instance, if 2 is a root of multiplicity three and 3 is a root of multiplicity 2, then roots looks something like [2, 2, 2, 3, 3]. The roots can appear in any order. If the returned coefficients are c, then The coefficient

numpy.polynomial.polynomial.polyfit()

numpy.polynomial.polynomial.polyfit(x, y, deg, rcond=None, full=False, w=None) [source] Least-squares fit of a polynomial to data. Return the coefficients of a polynomial of degree deg that is the least squares fit to the data values y given at points x. If y is 1-D the returned coefficients will also be 1-D. If y is 2-D multiple fits are done, one for each column of y, and the resulting coefficients are stored in the corresponding columns of a 2-D return. The fitted polynomial(s) are in th

numpy.polynomial.polynomial.polydomain

numpy.polynomial.polynomial.polydomain = array([-1, 1])

numpy.polynomial.polynomial.polydiv()

numpy.polynomial.polynomial.polydiv(c1, c2) [source] Divide one polynomial by another. Returns the quotient-with-remainder of two polynomials c1 / c2. The arguments are sequences of coefficients, from lowest order term to highest, e.g., [1,2,3] represents 1 + 2*x + 3*x**2. Parameters: c1, c2 : array_like 1-D arrays of polynomial coefficients ordered from low to high. Returns: [quo, rem] : ndarrays Of coefficient series representing the quotient and remainder. See also polyadd, poly

numpy.polynomial.polynomial.polyder()

numpy.polynomial.polynomial.polyder(c, m=1, scl=1, axis=0) [source] Differentiate a polynomial. Returns the polynomial coefficients c differentiated m times along axis. At each iteration the result is multiplied by scl (the scaling factor is for use in a linear change of variable). The argument c is an array of coefficients from low to high degree along each axis, e.g., [1,2,3] represents the polynomial 1 + 2*x + 3*x**2 while [[1,2],[1,2]] represents 1 + 1*x + 2*y + 2*x*y if axis=0 is x and

numpy.polynomial.polynomial.polycompanion()

numpy.polynomial.polynomial.polycompanion(c) [source] Return the companion matrix of c. The companion matrix for power series cannot be made symmetric by scaling the basis, so this function differs from those for the orthogonal polynomials. Parameters: c : array_like 1-D array of polynomial coefficients ordered from low to high degree. Returns: mat : ndarray Companion matrix of dimensions (deg, deg). Notes New in version 1.7.0.

numpy.polynomial.polynomial.polyadd()

numpy.polynomial.polynomial.polyadd(c1, c2) [source] Add one polynomial to another. Returns the sum 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 The coefficient array representing their sum. See also polysub, polymul, polydiv, polypow Examples &g

numpy.polynomial.legendre.poly2leg()

numpy.polynomial.legendre.poly2leg(pol) [source] Convert a polynomial to a Legendre series. Convert an array representing the coefficients of a polynomial (relative to the ?standard? basis) ordered from lowest degree to highest, to an array of the coefficients of the equivalent Legendre series, ordered from lowest to highest degree. Parameters: pol : array_like 1-D array containing the polynomial coefficients Returns: c : ndarray 1-D array containing the coefficients of the equivalent