Python Articles

Page 218 of 855

Differentiate a Chebyshev series in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 419 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 220 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

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 254 Views

To evaluate a 3-D Chebyshev series on the Cartesian product of x, y, z, use the numpy.polynomial.chebyshev.chebgrid3d() method. This function computes the Chebyshev polynomial values at all combinations of the input points. Syntax numpy.polynomial.chebyshev.chebgrid3d(x, y, z, c) Parameters The parameters are ? x, y, z − Arrays of coordinates. The 3-D series is evaluated at points in the Cartesian product of x, y, and z c − Array of coefficients. If c has fewer than three dimensions, ones are implicitly appended to make it 3-D Example Let's create a ...

Read More

Evaluate a 2-D polynomial at points (x, y) in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 816 Views

To evaluate a 2-D polynomial at points (x, y), use the numpy.polynomial.polynomial.polyval2d() method. This function evaluates a two-dimensional polynomial at specified coordinate points and returns the computed values. Syntax numpy.polynomial.polynomial.polyval2d(x, y, c) Parameters The function accepts three parameters ? x, y ? Coordinates where the polynomial is evaluated. Must have the same shape. c ? Array of coefficients where c[i, j] contains the coefficient for the term of multidegree i, j. Understanding Coefficient Array The coefficient array c represents a 2-D polynomial where each element c[i, j] corresponds to ...

Read More

Integrate a Chebyshev series in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 368 Views

To integrate a Chebyshev series in Python, use the chebyshev.chebint() method from NumPy. This function returns the Chebyshev series coefficients integrated m times from a lower bound along a specified axis. Syntax numpy.polynomial.chebyshev.chebint(c, m=1, k=[], lbnd=0, scl=1, axis=0) Parameters The function accepts the following parameters: c: Array of Chebyshev series coefficients. For multidimensional arrays, different axes correspond to different variables. m: Order of integration, must be positive (Default: 1) k: Integration constant(s). If empty list (default), all constants are set to zero lbnd: Lower bound of the integral (Default: 0) scl: Scaling ...

Read More

Evaluate a 3-D Chebyshev series on the Cartesian product of x, y and z in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 200 Views

To evaluate a 3-D Chebyshev series on the Cartesian product of x, y, z, use the numpy.polynomial.chebyshev.chebgrid3d() method in Python. This function computes the Chebyshev polynomial values at all combinations of the input coordinate arrays. The chebgrid3d() method takes coordinate arrays x, y, z and evaluates the 3-D Chebyshev series at their Cartesian product. If the coefficient array c has fewer than three dimensions, ones are implicitly appended to make it 3-D. The result shape will be c.shape[3:] + x.shape + y.shape + z.shape. Syntax numpy.polynomial.chebyshev.chebgrid3d(x, y, z, c) Parameters x, y, z: ...

Read More

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 180 Views

To evaluate a 2-D Chebyshev series on the Cartesian product of x and y, use the polynomial.chebgrid2d(x, y, c) method in Python. The method returns values of the two-dimensional Chebyshev series at points in the Cartesian product of x and y. If c has fewer than two dimensions, ones are implicitly appended to its shape to make it 2-D. Syntax numpy.polynomial.chebyshev.chebgrid2d(x, y, c) Parameters x, y − The two-dimensional series is evaluated at points in the Cartesian product of x and y. If x or y is a list or tuple, it is ...

Read More

Generate a monic polynomial with given complex roots in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 228 Views

To generate a monic polynomial with given complex roots, use the polynomial.polyfromroots() method in Python NumPy. The method returns a 1-D array of the polynomial's coefficients. If all the roots are real, then the output is also real, otherwise it is complex. The parameter roots is the sequence containing the roots. Syntax numpy.polynomial.polynomial.polyfromroots(roots) Parameters roots − Sequence containing the roots of the polynomial Return Value Returns a 1-D array of polynomial coefficients ordered from low to high degree. Example with Complex Roots Let's generate a monic polynomial with ...

Read More

Evaluate a 3-D Chebyshev series at points (x, y, z) with 4D array of coefficient in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 190 Views

To evaluate a 3-D Chebyshev series at points (x, y, z), use the polynomial.chebval3d() method in Python NumPy. The method returns the values of the multidimensional polynomial on points formed with triples of corresponding values from x, y, and z. Syntax numpy.polynomial.chebyshev.chebval3d(x, y, z, c) Parameters The function accepts the following parameters − x, y, z − The three dimensional series is evaluated at the points (x, y, z), where x, y, and z must have the same shape. If any of x, y, or z is a list or tuple, it ...

Read More

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 258 Views

To evaluate a 3-D Chebyshev series at points (x, y, z), use the polynomial.chebval3d() method in NumPy. The method returns the values of the multidimensional polynomial on points formed with triples of corresponding values from x, y, and z. Syntax numpy.polynomial.chebyshev.chebval3d(x, y, z, c) Parameters The parameters are: x, y, z − The three dimensional series is evaluated at the points (x, y, z), where x, y, and z must have the same shape. If any of x, y, or z is a list or tuple, it is ...

Read More
Showing 2171–2180 of 8,549 articles
« Prev 1 216 217 218 219 220 855 Next »
Advertisements