Articles on Trending Technologies

Technical articles with clear explanations and examples

Generate a monic polynomial with given complex roots in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 315 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 230 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 291 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

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 236 Views

To evaluate a 2-D Chebyshev series at points (x, y), use the polynomial.chebval2d() method in Python NumPy. The method returns the values of the two dimensional Chebyshev series at points formed from pairs of corresponding values from x and y. The parameter c is an array of coefficients ordered so that the coefficient of the term of multidegree i, j is contained in c[i, j]. If c has dimension greater than 2, the remaining indices enumerate multiple sets of coefficients. Syntax numpy.polynomial.chebyshev.chebval2d(x, y, c) Parameters The parameters x and y represent evaluation points ...

Read More

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 220 Views

To evaluate a Chebyshev series at points x with multi-dimensional coefficients, use the chebyshev.chebval() method in NumPy. This method handles coefficient arrays where each column represents a different polynomial series. Syntax numpy.polynomial.chebyshev.chebval(x, c, tensor=True) Parameters x: Points at which to evaluate the series. Can be scalar, list, or array. c: Array of coefficients. For multi-dimensional arrays, each column represents a separate polynomial. tensor: If True (default), evaluates every column of coefficients for every element of x. If False, broadcasts x over the columns. Example Let's create a 2D coefficient array ...

Read More

Evaluate a Chebyshev series at points x in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 390 Views

To evaluate a Chebyshev series at points x, use the chebyshev.chebval() method in Python NumPy. This function computes the value of a Chebyshev polynomial at specified points using the coefficients provided. Syntax numpy.polynomial.chebyshev.chebval(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 degree n terms tensor − If True (default), evaluates every column of c for every element of x Basic Example Let's evaluate ...

Read More

Raise a Chebyshev series to a power in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 254 Views

To raise a Chebyshev series to a power, use the chebyshev.chebpow() method in Python NumPy. This function returns the Chebyshev series c raised to the specified power. The argument c is a sequence of coefficients ordered from low to high, where [1, 2, 3] represents the series T_0 + 2*T_1 + 3*T_2. Syntax numpy.polynomial.chebyshev.chebpow(c, pow, maxpower=16) Parameters c − 1-D array of Chebyshev series coefficients ordered from low to high pow − Power to which the series will be raised maxpower − Maximum power allowed (default is 16) to limit series growth ...

Read More

Divide one Chebyshev series by another in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 213 Views

To divide one Chebyshev series by another, use the polynomial.chebyshev.chebdiv() method in Python NumPy. The method returns arrays of Chebyshev series coefficients representing the quotient and remainder. The method returns the quotient-with-remainder of two Chebyshev series c1 / c2. The arguments are sequences of coefficients from lowest order "term" to highest, e.g., [1, 2, 3] represents the series T_0 + 2*T_1 + 3*T_2. The parameters c1 and c2 are 1-D arrays of Chebyshev series coefficients ordered from low to high. Syntax numpy.polynomial.chebyshev.chebdiv(c1, c2) Parameters c1 − 1-D array of Chebyshev series coefficients ...

Read More

Evaluate a Hermite_e series at array of points x in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 253 Views

To evaluate a Hermite_e series at points x, use the hermite_e.hermeval() method in Python NumPy. This function computes the value of a Hermite_e polynomial series at given points using the provided coefficients. Syntax numpy.polynomial.hermite_e.hermeval(x, c, tensor=True) Parameters The function accepts the following parameters ? x − Array of points where the series is evaluated. Can be scalar, list, or ndarray c − Array of coefficients ordered so that coefficients for degree n are in c[n] tensor − If True (default), evaluates every column of coefficients for every element of x ...

Read More

Multiply one Chebyshev series to another in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 270 Views

To multiply one Chebyshev series to another, use the polynomial.chebyshev.chebmul() method in Python. This method returns an array of Chebyshev series coefficients representing their product. The arguments are sequences of coefficients, from lowest order "term" to highest, e.g., [1, 2, 3] represents the series T_0 + 2*T_1 + 3*T_2. Syntax numpy.polynomial.chebyshev.chebmul(c1, c2) Parameters The parameters are: c1, c2 − 1-D arrays of Chebyshev series coefficients ordered from low to high degree Example Let's multiply two Chebyshev series using chebmul() ? import numpy as np from numpy.polynomial import chebyshev ...

Read More
Showing 2181–2190 of 61,299 articles
« Prev 1 217 218 219 220 221 6130 Next »
Advertisements