numpy.polynomial.chebyshev.chebder()

numpy.polynomial.chebyshev.chebder(c, m=1, scl=1, axis=0) [source] Differentiate a Chebyshev series. Returns the Chebyshev series 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 series 1*T_0 + 2*T_1 + 3*T_2 while [[1,2],[1,2]] represents 1*T_0(x)*T_0(y) + 1*T_1(x)*T

numpy.polynomial.chebyshev.chebcompanion()

numpy.polynomial.chebyshev.chebcompanion(c) [source] Return the scaled companion matrix of c. The basis polynomials are scaled so that the companion matrix is symmetric when c is a Chebyshev basis polynomial. This provides better eigenvalue estimates than the unscaled case and for basis polynomials the eigenvalues are guaranteed to be real if numpy.linalg.eigvalsh is used to obtain them. Parameters: c : array_like 1-D array of Chebyshev series coefficients ordered from low to high degree.

numpy.polynomial.chebyshev.chebadd()

numpy.polynomial.chebyshev.chebadd(c1, c2) [source] Add one Chebyshev series to another. Returns the sum of two Chebyshev series c1 + c2. The arguments are sequences of coefficients ordered from lowest order term to highest, i.e., [1,2,3] represents the series T_0 + 2*T_1 + 3*T_2. Parameters: c1, c2 : array_like 1-D arrays of Chebyshev series coefficients ordered from low to high. Returns: out : ndarray Array representing the Chebyshev series of their sum. See also chebsub, chebmul

numpy.polynomial.chebyshev.cheb2poly()

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

numpy.polymul()

numpy.polymul(a1, a2) [source] Find the product of two polynomials. Finds the polynomial resulting from the multiplication of the two input polynomials. Each input must be either a poly1d object or a 1D sequence of polynomial coefficients, from highest to lowest degree. Parameters: a1, a2 : array_like or poly1d object Input polynomials. Returns: out : ndarray or poly1d object The polynomial resulting from the multiplication of the inputs. If either inputs is a poly1d object, then the

numpy.polyint()

numpy.polyint(p, m=1, k=None) [source] Return an antiderivative (indefinite integral) of a polynomial. The returned order m antiderivative P of polynomial p satisfies and is defined up to m - 1 integration constants k. The constants determine the low-order polynomial part of P so that . Parameters: p : array_like or poly1d Polynomial to differentiate. A sequence is interpreted as polynomial coefficients, see poly1d. m : int, optional Order of the antiderivative. (Default: 1) k : li

numpy.polyfit()

numpy.polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False) [source] Least squares polynomial fit. Fit a polynomial p(x) = p[0] * x**deg + ... + p[deg] of degree deg to points (x, y). Returns a vector of coefficients p that minimises the squared error. Parameters: x : array_like, shape (M,) x-coordinates of the M sample points (x[i], y[i]). y : array_like, shape (M,) or (M, K) y-coordinates of the sample points. Several data sets of sample points sharing the same x-coordinates c

numpy.polydiv()

numpy.polydiv(u, v) [source] Returns the quotient and remainder of polynomial division. The input arrays are the coefficients (including any coefficients equal to zero) of the ?numerator? (dividend) and ?denominator? (divisor) polynomials, respectively. Parameters: u : array_like or poly1d Dividend polynomial?s coefficients. v : array_like or poly1d Divisor polynomial?s coefficients. Returns: q : ndarray Coefficients, including those equal to zero, of the quotient. r : ndarray Coe

numpy.polyder()

numpy.polyder(p, m=1) [source] Return the derivative of the specified order of a polynomial. Parameters: p : poly1d or sequence Polynomial to differentiate. A sequence is interpreted as polynomial coefficients, see poly1d. m : int, optional Order of differentiation (default: 1) Returns: der : poly1d A new polynomial representing the derivative. See also polyint Anti-derivative of a polynomial. poly1d Class for one-dimensional polynomials. Examples The derivative of the pol

numpy.polyadd()

numpy.polyadd(a1, a2) [source] Find the sum of two polynomials. Returns the polynomial resulting from the sum of two input polynomials. Each input must be either a poly1d object or a 1D sequence of polynomial coefficients, from highest to lowest degree. Parameters: a1, a2 : array_like or poly1d object Input polynomials. Returns: out : ndarray or poly1d object The sum of the inputs. If either input is a poly1d object, then the output is also a poly1d object. Otherwise, it is a 1D array