Numpy Articles

Page 20 of 81

Compute the roots of a Laguerre series in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 410 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 181 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

Integrate a Laguerre series over axis 0 in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 200 Views

To integrate a Laguerre series over a specific axis in Python, use the numpy.polynomial.laguerre.lagint() method. This function integrates a Laguerre series along a specified axis, returning the integrated coefficients. Syntax numpy.polynomial.laguerre.lagint(c, m=1, k=[], lbnd=0, scl=1, axis=0) Parameters c − Array of Laguerre series coefficients. For multidimensional arrays, different axes correspond to different variables m − Order of integration (must be positive, default: 1) k − Integration constant(s). Default is empty list (all constants set to zero) lbnd − Lower bound of the integral (default: 0) scl − Scaling factor applied after each integration ...

Read More

Differentiate a Laguerre series with multidimensional coefficients over axis 1 in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 161 Views

To differentiate a Laguerre series with multidimensional coefficients, use the laguerre.lagder() method in Python NumPy. This method returns the Laguerre series coefficients differentiated m times along a specified axis. The coefficient array c represents Laguerre series from low to high degree. For example, [1, 2, 3] represents 1*L_0 + 2*L_1 + 3*L_2, while [[1, 2], [1, 2]] represents a 2D series if axis=0 is x and axis=1 is y. Syntax numpy.polynomial.laguerre.lagder(c, m=1, scl=1, axis=0) Parameters c − Array of Laguerre series coefficients. For multidimensional arrays, different axes correspond to different variables. m ...

Read More

Differentiate a Laguerre series with multidimensional coefficients over specific axis in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 193 Views

To differentiate a Laguerre series with multidimensional coefficients, use the laguerre.lagder() method in Python. This method returns the Laguerre series coefficients differentiated m times along a specified axis. At each iteration, the result is multiplied by a scalar value. The coefficient array represents Laguerre polynomials where [1, 2, 3] represents the series 1*L_0 + 2*L_1 + 3*L_2. For multidimensional arrays like [[1, 2], [1, 2]], it represents 1*L_0(x)*L_0(y) + 1*L_1(x)*L_0(y) + 2*L_0(x)*L_1(y) + 2*L_1(x)*L_1(y) if axis=0 is x and axis=1 is y. Syntax laguerre.lagder(c, m=1, scl=1, axis=0) Parameters c: Array of Laguerre series ...

Read More

Differentiate a Laguerre series and multiply each differentiation by a scalar in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 243 Views

To differentiate a Laguerre series, use the laguerre.lagder() method in Python. The method returns the Laguerre series coefficients differentiated m times along axis. At each iteration, the result is multiplied by a scalar value scl. The coefficient array c represents coefficients from low to high degree. For example, [1, 2, 3] represents the series 1*L_0 + 2*L_1 + 3*L_2, where L_n are Laguerre polynomials. Syntax numpy.polynomial.laguerre.lagder(c, m=1, scl=1, axis=0) Parameters c − Array of Laguerre series coefficients m − Number of derivatives taken (default: 1) scl − Scalar multiplier applied to each ...

Read More

Get the Least squares fit of Laguerre series to data in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 350 Views

The Laguerre series is a set of orthogonal polynomials useful for data fitting. NumPy's laguerre.lagfit() method performs least squares fitting of Laguerre series to data points. Syntax laguerre.lagfit(x, y, deg, rcond=None, full=False, w=None) Parameters x − x-coordinates of the sample points y − y-coordinates of the sample points deg − degree of the fitting polynomial rcond − relative condition number (optional) full − if True, returns diagnostic information (default: False) w − weights for each data point (optional) Return Value Returns Laguerre coefficients ordered from low to high. When full=True, ...

Read More

Generate a Pseudo Vandermonde matrix of the Laguerre polynomial and x, y floating array of points in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 186 Views

To generate a pseudo Vandermonde matrix of the Laguerre polynomial, use the laguerre.lagvander2d() function in NumPy. This method returns a pseudo-Vandermonde matrix where each element corresponds to a Laguerre polynomial evaluated at the given points. The pseudo-Vandermonde matrix has shape x.shape + (deg + 1, ), where the last index represents the degree of the corresponding Laguerre polynomial. The dtype matches the converted input arrays. Syntax numpy.polynomial.laguerre.lagvander2d(x, y, deg) Parameters x, y − Array of points with coordinates. Converted to float64 or complex128 depending on element types deg − List of maximum ...

Read More

Generate a Pseudo Vandermonde matrix of the Laguerre polynomial and x, y array of points in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 177 Views

To generate a pseudo Vandermonde matrix of the Laguerre polynomial, use the laguerre.lagvander2d() in Python NumPy. The method returns the pseudo-Vandermonde matrix where each element corresponds to the evaluation of Laguerre polynomials at given points. The parameter x, y are arrays of points with the same shape. The dtype is converted to float64 or complex128 depending on whether any elements are complex. The parameter deg is a list of maximum degrees of the form [x_deg, y_deg]. Syntax numpy.polynomial.laguerre.lagvander2d(x, y, deg) Example Let's create a pseudo Vandermonde matrix using coordinate points and specified polynomial ...

Read More
Showing 191–200 of 802 articles
« Prev 1 18 19 20 21 22 81 Next »
Advertisements