Python Articles

Page 233 of 855

Integrate a Laguerre series in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 211 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 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. If c is multidimensional the different axis correspond to different variables with the degree in ...

Read More

Generate a Chebyshev series with given roots in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 281 Views

To generate a Chebyshev series with given roots, use the chebyshev.chebfromroots() method in Python NumPy. The method returns a 1-D array of coefficients. If all roots are real then out is a real array, if some of the roots are complex, then out is complex even if all the coefficients in the result are real. The parameter roots is the sequence containing the roots. Syntax numpy.polynomial.chebyshev.chebfromroots(roots) Parameters roots − Sequence containing the roots. Return Value Returns 1-D array of Chebyshev series coefficients ordered from low to high degree. Example Let's ...

Read More

Evaluate a Laguerre series at points x with multidimensional coefficient array in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 199 Views

To evaluate a Laguerre series at points x with a multidimensional coefficient array, use the polynomial.laguerre.lagval() method in Python NumPy. This method allows you to evaluate multiple Laguerre polynomials simultaneously using a 2D coefficient matrix. Syntax numpy.polynomial.laguerre.lagval(x, c, tensor=True) Parameters The function accepts three parameters ? x − Points at which to evaluate the series. Can be scalar, list, or array c − Coefficient array where coefficients for degree n are in c[n]. For multidimensional arrays, additional indices represent multiple polynomials tensor − Boolean flag controlling evaluation behavior (default True) ...

Read More

Evaluate a Laguerre series at list of points x in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 223 Views

To evaluate a Laguerre series at points x, use the polynomial.laguerre.lagval() method in NumPy. This function takes evaluation points and coefficients to compute the series values. 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 a scalar, list, or array c − Array of coefficients ordered from lowest to highest degree tensor − Boolean controlling evaluation behavior for multidimensional arrays (default: True) Example Let's evaluate a Laguerre series with coefficients [1, 2, 3] at multiple ...

Read More

Evaluate a Laguerre series at tuple of points x in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 171 Views

To evaluate a Laguerre series at points x, use the polynomial.laguerre.lagval() method in Python NumPy. The first parameter is x, which can be a list, tuple, or scalar. If x is a list or tuple, it is converted to an ndarray, otherwise it is left unchanged and treated as a scalar. The second parameter c is an array of coefficients ordered so that the coefficients for terms of degree n are contained in c[n]. If c is multidimensional, the remaining indices enumerate multiple polynomials. The third parameter tensor controls the evaluation behavior. If True (default), the shape of ...

Read More

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 201 Views

To generate a pseudo Vandermonde matrix of the Laguerre polynomial with x, y, z sample points, use the laguerre.lagvander3d() method in NumPy. This function creates a three-dimensional Vandermonde matrix where each element corresponds to the evaluation of Laguerre polynomials at the given complex points. Syntax numpy.polynomial.laguerre.lagvander3d(x, y, z, deg) Parameters The function accepts the following parameters: x, y, z − Arrays of point coordinates. The dtype is converted to float64 or complex128 depending on whether any elements are complex deg − List of maximum degrees of the form [x_deg, y_deg, z_deg] ...

Read More

Evaluate a Legendre series at points x and the shape of the coefficient array extended for each dimension of x in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 186 Views

To evaluate a Legendre series at points x, use the polynomial.legendre.legval() method in NumPy. This function allows you to evaluate Legendre polynomials with specified coefficients at given points, with control over how multidimensional coefficient arrays are handled. Syntax numpy.polynomial.legendre.legval(x, c, tensor=True) Parameters The function accepts three parameters: x: Points at which to evaluate the series. Can be a scalar, list, or array c: Array of coefficients where c[n] contains coefficients for terms of degree n tensor: Boolean controlling shape behavior for multidimensional arrays (default: True) Understanding the Tensor Parameter ...

Read More

Evaluate a Legendre series at points x when coefficients are multi-dimensional in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 189 Views

To evaluate a Legendre series at points x with multi-dimensional coefficients, use the polynomial.legendre.legval() method in Python NumPy. This method handles arrays of coefficients where each column represents a separate polynomial. Syntax numpy.polynomial.legendre.legval(x, c, tensor=True) Parameters The method accepts three parameters ? x − Points at which to evaluate the series. Can be scalar, list, or array c − Array of coefficients. For multi-dimensional arrays, columns represent different polynomials tensor − If True (default), evaluates every column for every point in x Example Let's create a multi-dimensional coefficient array ...

Read More

Differentiate a Hermite series and set the derivatives in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 210 Views

To differentiate a Hermite series, use the hermite.hermder() method in Python. This function computes the derivative of a Hermite series representation of a polynomial. Syntax numpy.polynomial.hermite.hermder(c, m=1, scl=1, axis=0) Parameters The hermder() method accepts the following parameters: c − Array of Hermite series coefficients. If multidimensional, different axes correspond to different variables m − Number of derivatives taken, must be non-negative (Default: 1) scl − Scalar multiplier for each differentiation. Final result is multiplied by scl**m (Default: 1) axis − Axis over which the derivative is taken (Default: 0) Basic ...

Read More

Differentiate a Hermite series with multidimensional coefficients in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 214 Views

To differentiate a Hermite series with multidimensional coefficients, use the hermite.hermder() method in Python. This function handles multidimensional arrays where different axes correspond to different variables. Syntax numpy.polynomial.hermite.hermder(c, m=1, scl=1, axis=0) Parameters The hermder() method accepts the following parameters: c: Array of Hermite series coefficients. If multidimensional, different axes correspond to different variables m: Number of derivatives taken (default: 1). Must be non-negative scl: Scalar multiplier for each differentiation (default: 1). Final result is multiplied by scl**m axis: Axis over which the derivative is taken (default: 0) Example Let's ...

Read More
Showing 2321–2330 of 8,546 articles
« Prev 1 231 232 233 234 235 855 Next »
Advertisements