Programming Articles

Page 191 of 2547

Return the Frobenius Norm of the matrix in Linear Algebra in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 2K+ Views

The Frobenius norm is a matrix norm that calculates the square root of the sum of squares of all elements in a matrix. In Python, use numpy.linalg.norm() with ord='fro' parameter to compute the Frobenius norm. Syntax numpy.linalg.norm(x, ord='fro') Parameters: x − Input matrix (2-D array) ord − Order of the norm. Use 'fro' for Frobenius norm How Frobenius Norm Works The Frobenius norm is calculated as: ||A|| F = √ Σ Σ |a ij ...

Read More

Integrate a Legendre series and multiply the result by a scalar before the integration constant is added in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 192 Views

To integrate a Legendre series and multiply the result by a scalar before adding the integration constant, use the polynomial.legendre.legint() method in Python. This method integrates Legendre series coefficients and allows scaling at each iteration before adding integration constants. Syntax numpy.polynomial.legendre.legint(c, m=1, k=[], lbnd=0, scl=1, axis=0) Parameters c − Array of Legendre series coefficients m − Order of integration (default: 1) k − Integration constant(s) (default: []) lbnd − Lower bound of integral (default: 0) scl − Scalar multiplier applied before adding integration constant (default: 1) axis − Axis over which integration is ...

Read More

Integrate a Legendre series and set the lower bound of the integral in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 229 Views

To integrate a Legendre series, use the polynomial.legendre.legint() method in Python. This method returns the Legendre series coefficients integrated m times from the lower bound (lbnd) along the specified axis. At each iteration, the resulting series is multiplied by a scaling factor and an integration constant is added. Syntax numpy.polynomial.legendre.legint(c, m=1, k=[], lbnd=0, scl=1, axis=0) Parameters Parameter Description Default c Array of Legendre series coefficients Required m Order of integration (must be positive) 1 k Integration constant(s) [] lbnd Lower bound of the integral ...

Read More

Integrate a Legendre series and set the integration constant in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 193 Views

To integrate a Legendre series in Python, use the polynomial.legendre.legint() method from NumPy. This method integrates Legendre series coefficients and allows you to set integration constants, making it useful for solving differential equations and polynomial manipulations. Syntax numpy.polynomial.legendre.legint(c, m=1, k=[], lbnd=0, scl=1, axis=0) Parameters The legint() method accepts the following parameters: c: Array of Legendre series coefficients m: Order of integration (default: 1) k: Integration constant(s). Use a scalar for single integration or a list for multiple integrations (default: []) lbnd: Lower bound of the integral (default: 0) scl: Scaling factor applied ...

Read More

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 223 Views

To differentiate a Legendre series, use the polynomial.legendre.legder() method in Python. This function returns the Legendre series coefficients differentiated m times along axis, with each differentiation multiplied by a scalar. Syntax numpy.polynomial.legendre.legder(c, m=1, scl=1, axis=0) Parameters The function accepts the following parameters ? c ? Array of Legendre series coefficients. If multidimensional, different axes correspond to different variables m ? Number of derivatives taken, must be non-negative (Default: 1) scl ? Scalar multiplier. Each differentiation is multiplied by scl, resulting in multiplication by scl**m (Default: 1) axis ? Axis over which the ...

Read More

Evaluate a 3-D Hermite_e series at points (x,y,z) in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 192 Views

To evaluate a 3-D Hermite_e series at points (x, y, z), use the numpy.polynomial.hermite_e.hermeval3d() method. This method evaluates a three-dimensional Hermite_e polynomial series and returns values at the specified coordinate points. Syntax numpy.polynomial.hermite_e.hermeval3d(x, y, z, c) Parameters x, y, z − The three-dimensional series is evaluated at points (x, y, z). These arrays must have the same shape. If any parameter is a list or tuple, it is converted to an ndarray. c − Array of coefficients ordered so that the coefficient of the term of multi-degree i, j, k is contained in ...

Read More

Evaluate a Hermite_e series at multi-dimensional array of points x in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 192 Views

To evaluate a Hermite_e series at points x, use the hermite_e.hermeval() method in Python NumPy. This function evaluates Hermite_e polynomials at specified points using coefficient arrays. Syntax numpy.polynomial.hermite_e.hermeval(x, c, tensor=True) Parameters The function accepts three parameters ? x − Points where the series is evaluated. Can be a scalar, list, tuple, or ndarray c − Array of coefficients where c[n] contains coefficients for degree n terms tensor − If True (default), evaluates every column of coefficients for every element of x Example Let's evaluate a Hermite_e series with coefficients ...

Read More

Differentiate a Chebyshev series with multidimensional coefficients in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 215 Views

To differentiate a Chebyshev series with multidimensional coefficients, use the polynomial.chebder() method in NumPy. The method returns the Chebyshev series coefficients of the derivative, differentiated m times along a specified axis. The argument c is an array of coefficients from low to high degree along each axis. For example, [1, 2, 3] represents the series 1*T_0 + 2*T_1 + 3*T_2 while [[1, 2], [1, 2]] represents 1*T_0(x)*T_0(y) + 1*T_1(x)*T_0(y) + 2*T_0(x)*T_1(y) + 2*T_1(x)*T_1(y) if axis=0 is x and axis=1 is y. Syntax numpy.polynomial.chebyshev.chebder(c, m=1, scl=1, axis=0) Parameters c − Array of Chebyshev ...

Read More

Differentiate a Chebyshev series in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 408 Views

To differentiate a Chebyshev series, use the polynomial.chebder() method in NumPy. This method returns the Chebyshev series coefficients of the derivative. The coefficients are differentiated m times along the specified axis, with each iteration multiplied by a scale factor. The argument c is an array of coefficients from low to high degree. For example, [1, 2, 3] represents the series 1*T_0 + 2*T_1 + 3*T_2, where T_n are Chebyshev polynomials. Syntax numpy.polynomial.chebyshev.chebder(c, m=1, scl=1, axis=0) Parameters The method accepts four parameters − c − Array of Chebyshev series coefficients m − ...

Read More

Evaluate a 3-D Chebyshev series on the Cartesian product of x, y and z with 2d array of coefficient in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 214 Views

To evaluate a 3-D Chebyshev series on the Cartesian product of x, y, z, use the polynomial.chebgrid3d() method in Python. This function evaluates a multidimensional Chebyshev series at points formed by the Cartesian product of the input arrays. Understanding the Parameters The chebgrid3d(x, y, z, c) method takes four parameters: x, y, z − The coordinates where the 3-D series is evaluated. If any parameter is a list or tuple, it's converted to an ndarray c − Array of coefficients ordered so that coefficients for terms of degree i, j are in c[i, j]. If c ...

Read More
Showing 1901–1910 of 25,469 articles
« Prev 1 189 190 191 192 193 2547 Next »
Advertisements