New in version 1.6.0.
numpy.polynomial.legendre
This module provides a number of objects (mostly functions) useful for dealing with Legendre series, including a Legendre class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in the docstring for its “parent” sub-package, numpy.polynomial).
Legendre
numpy.polynomial
Legendre(coef[, domain, window])
A Legendre series class.
legdomain
legzero
legone
legx
legadd(c1, c2)
legadd
Add one Legendre series to another.
legsub(c1, c2)
legsub
Subtract one Legendre series from another.
legmulx(c)
legmulx
Multiply a Legendre series by x.
legmul(c1, c2)
legmul
Multiply one Legendre series by another.
legdiv(c1, c2)
legdiv
Divide one Legendre series by another.
legpow(c, pow[, maxpower])
legpow
Raise a Legendre series to a power.
legval(x, c[, tensor])
legval
Evaluate a Legendre series at points x.
legval2d(x, y, c)
legval2d
Evaluate a 2-D Legendre series at points (x, y).
legval3d(x, y, z, c)
legval3d
Evaluate a 3-D Legendre series at points (x, y, z).
leggrid2d(x, y, c)
leggrid2d
Evaluate a 2-D Legendre series on the Cartesian product of x and y.
leggrid3d(x, y, z, c)
leggrid3d
Evaluate a 3-D Legendre series on the Cartesian product of x, y, and z.
legder(c[, m, scl, axis])
legder
Differentiate a Legendre series.
legint(c[, m, k, lbnd, scl, axis])
legint
Integrate a Legendre series.
legfromroots(roots)
legfromroots
Generate a Legendre series with given roots.
legroots(c)
legroots
Compute the roots of a Legendre series.
legvander(x, deg)
legvander
Pseudo-Vandermonde matrix of given degree.
legvander2d(x, y, deg)
legvander2d
Pseudo-Vandermonde matrix of given degrees.
legvander3d(x, y, z, deg)
legvander3d
leggauss(deg)
leggauss
Gauss-Legendre quadrature.
legweight(x)
legweight
Weight function of the Legendre polynomials.
legcompanion(c)
legcompanion
Return the scaled companion matrix of c.
legfit(x, y, deg[, rcond, full, w])
legfit
Least squares fit of Legendre series to data.
legtrim(c[, tol])
legtrim
Remove “small” “trailing” coefficients from a polynomial.
legline(off, scl)
legline
Legendre series whose graph is a straight line.
leg2poly(c)
leg2poly
Convert a Legendre series to a polynomial.
poly2leg(pol)
poly2leg
Convert a polynomial to a Legendre series.