numpy.polynomial.legendre.legsub()

numpy.polynomial.legendre.legsub(c1, c2) [source] Subtract one Legendre series from another. Returns the difference of two Legendre series c1 - c2. The sequences of coefficients are from lowest order term to highest, i.e., [1,2,3] represents the series P_0 + 2*P_1 + 3*P_2. Parameters: c1, c2 : array_like 1-D arrays of Legendre series coefficients ordered from low to high. Returns: out : ndarray Of Legendre series coefficients representing their difference. See also legadd, legmul,

numpy.polynomial.legendre.legroots()

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

numpy.polynomial.legendre.legpow()

numpy.polynomial.legendre.legpow(c, pow, maxpower=16) [source] Raise a Legendre series to a power. Returns the Legendre series c raised to the power pow. The arguement c is a sequence of coefficients ordered from low to high. i.e., [1,2,3] is the series P_0 + 2*P_1 + 3*P_2. Parameters: c : array_like 1-D array of Legendre series coefficients ordered from low to high. pow : integer Power to which the series will be raised maxpower : integer, optional Maximum power allowed. This is main

numpy.polynomial.legendre.legone

numpy.polynomial.legendre.legone = array([1])

numpy.polynomial.legendre.legmulx()

numpy.polynomial.legendre.legmulx(c) [source] Multiply a Legendre series by x. Multiply the Legendre series c by x, where x is the independent variable. Parameters: c : array_like 1-D array of Legendre series coefficients ordered from low to high. Returns: out : ndarray Array representing the result of the multiplication. Notes The multiplication uses the recursion relationship for Legendre polynomials in the form

numpy.polynomial.legendre.legmul()

numpy.polynomial.legendre.legmul(c1, c2) [source] Multiply one Legendre series by another. Returns the product of two Legendre series c1 * c2. The arguments are sequences of coefficients, from lowest order ?term? to highest, e.g., [1,2,3] represents the series P_0 + 2*P_1 + 3*P_2. Parameters: c1, c2 : array_like 1-D arrays of Legendre series coefficients ordered from low to high. Returns: out : ndarray Of Legendre series coefficients representing their product. See also legadd, leg

numpy.polynomial.legendre.legline()

numpy.polynomial.legendre.legline(off, scl) [source] Legendre series whose graph is a straight line. Parameters: off, scl : scalars The specified line is given by off + scl*x. Returns: y : ndarray This module?s representation of the Legendre series for off + scl*x. See also polyline, chebline Examples >>> import numpy.polynomial.legendre as L >>> L.legline(3,2) array([3, 2]) >>> L.legval(-3, L.legline(3,2)) # should be -3 -3.0

numpy.polynomial.legendre.legint()

numpy.polynomial.legendre.legint(c, m=1, k=[], lbnd=0, scl=1, axis=0) [source] Integrate a Legendre series. Returns the Legendre series 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 inform

numpy.polynomial.legendre.leggrid3d()

numpy.polynomial.legendre.leggrid3d(x, y, z, c) [source] Evaluate a 3-D Legendre series 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.

numpy.polynomial.legendre.leggrid2d()

numpy.polynomial.legendre.leggrid2d(x, y, c) [source] Evaluate a 2-D Legendre series 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 ele