Python Articles

Page 219 of 855

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 181 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 336 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 205 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 177 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 206 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 228 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

Raise a Hermite_e series to a power in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 223 Views

To raise a Hermite_e series to a power, use the polynomial.hermite_e.hermepow() method in Python NumPy. The method returns a Hermite_e series raised to the specified power. The argument c is a sequence of coefficients ordered from low to high, i.e., [1, 2, 3] represents the series P_0 + 2*P_1 + 3*P_2. Parameters The hermepow() method accepts the following parameters ? c ? 1-D array of Hermite_e 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

Differentiate a Legendre series and set the derivatives in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 283 Views

To differentiate a Legendre series in Python, use the numpy.polynomial.legendre.legder() method. This function returns the Legendre series coefficients differentiated m times along the specified axis. Syntax numpy.polynomial.legendre.legder(c, m=1, scl=1, axis=0) Parameters The method 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 for each differentiation (default: 1) axis: Axis over which the derivative is taken (default: 0) Example Let's differentiate a Legendre series with different derivative orders: ...

Read More

Evaluate a Legendre series at multidimensional array of points x in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 225 Views

To evaluate a Legendre series at multi-dimensional array of points x, use the polynomial.legendre.legval() method in Python NumPy. This function evaluates Legendre polynomials at given points using coefficient arrays. Syntax numpy.polynomial.legendre.legval(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, tuple, or ndarray c − Array of coefficients ordered so that coefficients for degree n terms are in c[n] tensor − Boolean flag controlling evaluation behavior (default: True) Example Let's evaluate a Legendre series ...

Read More

Differentiate a Legendre series with multidimensional coefficients in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 201 Views

To differentiate a Legendre series with multidimensional coefficients, use the polynomial.legendre.legder() method in Python. This function returns the Legendre series coefficients differentiated m times along a specified axis. 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 for each differentiation. Final result is multiplied by scl**m (Default: 1) axis − Axis along which the derivative is taken (Default: ...

Read More
Showing 2181–2190 of 8,546 articles
« Prev 1 217 218 219 220 221 855 Next »
Advertisements