numpy.polynomial.legendre.leg2poly(c)
[source]
Convert a Legendre series to a polynomial.
Convert an array representing the coefficients of a Legendre 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: |
|
---|---|
Returns: |
|
See also
The easy way to do conversions between polynomial basis sets is to use the convert method of a class instance.
>>> from numpy import polynomial as P >>> c = P.Legendre(range(4)) >>> c Legendre([0., 1., 2., 3.], domain=[-1, 1], window=[-1, 1]) >>> p = c.convert(kind=P.Polynomial) >>> p Polynomial([-1. , -3.5, 3. , 7.5], domain=[-1., 1.], window=[-1., 1.]) >>> P.leg2poly(range(4)) array([-1. , -3.5, 3. , 7.5])
© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.polynomial.legendre.leg2poly.html