{ } Raw JSON

bundles / numpy 2.4.4 / numpy / polynomial / legendre / leg2poly

function

numpy.polynomial.legendre:leg2poly

source: /numpy/polynomial/legendre.py :147

Signature

def   leg2poly ( c )

Summary

Convert a Legendre series to a polynomial.

Extended Summary

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

c : array_like

1-D array containing the Legendre series coefficients, ordered from lowest order term to highest.

Returns

pol : ndarray

1-D array containing the coefficients of the equivalent polynomial (relative to the "standard" basis) ordered from lowest order term to highest.

Notes

The easy way to do conversions between polynomial basis sets is to use the convert method of a class instance.

Examples

from numpy import polynomial as P
c = P.Legendre(range(4))
c
p = c.convert(kind=P.Polynomial)
p
P.legendre.leg2poly(range(4))

See also

poly2leg

Aliases

  • numpy.polynomial.legendre.leg2poly