A Legendre series class.
The Legendre class provides the standard Python numerical methods ‘+’, ‘-’, ‘*’, ‘//’, ‘%’, ‘divmod’, ‘**’, and ‘()’ as well as the attributes and methods listed below.
Legendre coefficients in order of increasing degree, i.e., (1, 2, 3) gives 1*P_0(x) + 2*P_1(x) + 3*P_2(x).
Domain to use. The interval [domain[0], domain[1]] is mapped to the interval [window[0], window[1]] by shifting and scaling. The default value is [-1., 1.].
Window, see domain for its use. The default value is [-1., 1.].
Symbol used to represent the independent variable in string representations of the polynomial expression, e.g. for printing. The symbol must be a valid Python identifier. Default value is ‘x’.
New in version 1.24.
| Call self as a function. |
| Series basis polynomial of degree |
| Convert series to series of this class. |
| Convert series to a different kind and/or domain and/or window. |
| Return a copy. |
| Truncate series to the given degree. |
| The degree of the series. |
| Differentiate. |
| Least squares fit to data. |
| Return series instance that has the specified roots. |
| Check if coefficients match. |
| Check if domains match. |
| Check if types match. |
| Check if windows match. |
| Identity function. |
| Integrate. |
| Return x, y values at equally spaced points in domain. |
| Return the mapping parameters. |
| Return the roots of the series polynomial. |
| Remove trailing coefficients |
| Truncate series to length |
© 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/2.4/reference/generated/numpy.polynomial.legendre.Legendre.html