Python Articles

Page 226 of 855

Evaluate a Laguerre series at array of points x in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 188 Views

To evaluate a Laguerre series at array of points x, use the polynomial.laguerre.lagval() method in Python NumPy. This method evaluates a Laguerre polynomial series at given points using the coefficients and evaluation points you provide. Syntax The lagval() method has the following syntax: numpy.polynomial.laguerre.lagval(x, c, tensor=True) Parameters x − Array of points at which to evaluate the polynomial. If x is a list or tuple, it is converted to an ndarray. Elements must support addition and multiplication with coefficient elements. c − Array of coefficients ordered so that coefficients for terms of ...

Read More

Evaluate a Laguerre series at points x broadcast over the columns of the coefficient in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 179 Views

To evaluate a Laguerre series at points x, use the polynomial.laguerre.lagval() method in Python NumPy. This function broadcasts evaluation points over coefficient columns when tensor=False. Syntax numpy.polynomial.laguerre.lagval(x, c, tensor=True) Parameters The function accepts three parameters ? x − Array of points at which to evaluate the series. Can be scalar, list, or array c − Array of coefficients ordered so that coefficients for degree n are in c[n]. For multidimensional arrays, remaining indices enumerate multiple polynomials tensor − If True (default), extends coefficient shape. If False, broadcasts x over coefficient columns ...

Read More

Integrate a Laguerre series over axis 1 in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 219 Views

To integrate a Laguerre series, use the laguerre.lagint() method in Python. The method returns the Laguerre 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. Syntax numpy.polynomial.laguerre.lagint(c, m=1, k=[], lbnd=0, scl=1, axis=0) Parameters c − Array of Laguerre series coefficients. If c is multidimensional, different axes correspond to different variables m − Order of integration, must be positive (Default: 1) k − Integration ...

Read More

Integrate a Laguerre series over specific axis in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 187 Views

The Laguerre polynomial integration in Python can be performed using NumPy's laguerre.lagint() method. This function integrates Laguerre series coefficients along a specified axis, allowing for flexible multi-dimensional operations. Syntax numpy.polynomial.laguerre.lagint(c, m=1, k=[], lbnd=0, scl=1, axis=0) Parameters The function accepts the following parameters: c − Array of Laguerre series coefficients m − Order of integration (default: 1) k − Integration constant(s) (default: []) lbnd − Lower bound of integral (default: 0) scl − Scaling factor (default: 1) axis − Axis over which integration is performed (default: 0) Basic Integration Example ...

Read More

Generate a Vandermonde matrix of the Laguerre polynomial with float array of points in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 201 Views

To generate a Vandermonde matrix of the Laguerre polynomial, use the laguerre.lagvander() method in NumPy. This function returns a pseudo-Vandermonde matrix where each row contains the Laguerre polynomial values evaluated at a specific point. The Laguerre polynomials are orthogonal polynomials used in mathematical analysis and physics. The Vandermonde matrix has shape x.shape + (deg + 1, ), where the last index corresponds to the polynomial degree. Syntax numpy.polynomial.laguerre.lagvander(x, deg) Parameters x: Array of points. Converted to float64 or complex128 depending on element types. Scalar values are converted to 1-D arrays. deg: Degree ...

Read More

Generate a Vandermonde matrix of the Laguerre polynomial in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 209 Views

To generate a pseudo Vandermonde matrix of the Laguerre polynomial, use the laguerre.lagvander() function in Python NumPy. The method returns the pseudo-Vandermonde matrix with shape x.shape + (deg + 1, ), where the last index corresponds to the degree of the Laguerre polynomial. The dtype will match the converted x array. The parameter x is an array of points, converted to float64 or complex128 depending on whether elements are complex. If x is scalar, it converts to a 1-D array. The parameter deg specifies the degree of the resulting matrix. Syntax numpy.polynomial.laguerre.lagvander(x, deg) Parameters ...

Read More

Compute the roots of a Laguerre series with given complex roots in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 249 Views

To compute the roots of a Laguerre series, use the laguerre.lagroots() method in Python NumPy. The method returns an array of the roots of the series. If all the roots are real, then output is also real, otherwise it is complex. The root estimates are obtained as the eigenvalues of the companion matrix. Roots far from the origin of the complex plane may have large errors due to the numerical instability of the series for such values. Roots with multiplicity greater than 1 will also show larger errors as the value of the series near such points is relatively ...

Read More

Compute the roots of a Laguerre series in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 407 Views

To compute the roots of a Laguerre series, use the laguerre.lagroots() method in Python NumPy. The method returns an array of the roots of the series. If all the roots are real, then the output is also real, otherwise it is complex. The root estimates are obtained as the eigenvalues of the companion matrix. Roots far from the origin of the complex plane may have large errors due to the numerical instability of the series for such values. Roots with multiplicity greater than 1 will also show larger errors as the value of the series near such points is ...

Read More

Generate a Laguerre series with given complex roots in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 177 Views

To generate a Laguerre series with given complex roots, use the laguerre.lagfromroots() method in Python NumPy. This method returns a 1-D array of coefficients representing the Laguerre polynomial. If all roots are real, the output is a real array. If some roots are complex, the output is complex even if all coefficients in the result are real. Syntax numpy.polynomial.laguerre.lagfromroots(roots) Parameters roots: A sequence containing the roots of the polynomial. Example with Complex Roots Let's generate a Laguerre series with complex conjugate roots − from numpy.polynomial import laguerre as L ...

Read More

Generate a Laguerre series with given roots in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 194 Views

To generate a Laguerre series with given roots in Python NumPy, use the laguerre.lagfromroots() method. This function returns a 1-D array of coefficients representing the polynomial. If all roots are real, the output is a real array; if some roots are complex, the output is complex even if all resulting coefficients are real. Syntax numpy.polynomial.laguerre.lagfromroots(roots) Parameters: roots − Sequence containing the roots of the polynomial Returns: 1-D array of Laguerre series coefficients ordered from lowest to highest degree. Example with Real Roots Let's generate a Laguerre series with roots at ...

Read More
Showing 2251–2260 of 8,546 articles
« Prev 1 224 225 226 227 228 855 Next »
Advertisements