Programming Articles

Page 218 of 2547

Evaluate a Chebyshev 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 215 Views

To evaluate a Chebyshev series at points x, use the chebyshev.chebval() method in Python NumPy. This function evaluates Chebyshev polynomials at specified points and handles multidimensional coefficient arrays efficiently. Parameters The chebval() method takes three main parameters: x: The points where the series is evaluated. Can be a scalar, list, tuple, or ndarray c: Array of coefficients where c[n] contains coefficients for terms of degree n tensor: Boolean flag controlling shape extension behavior (default: True) Understanding the Tensor Parameter When tensor=True, the coefficient array shape is extended with ones on the right for ...

Read More

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 339 Views

To evaluate a 3-D polynomial at points (x, y, z), use the polynomial.polyval3d() 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.polynomial.polyval3d(x, y, z, c) 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 is first converted to an ndarray, ...

Read More

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 273 Views

To evaluate a 3-D Hermite_e series on the Cartesian product of x, y and z, use the hermite_e.hermegrid3d(x, y, z, c) method in Python. This method returns the values of the three-dimensional polynomial at points in the Cartesian product of x, y and z. Parameters The method accepts the following parameters: x, y, z: The three-dimensional series is evaluated at points in the Cartesian product of x, y, and z. If x, y, or z is a list or tuple, it is first converted to an ndarray, otherwise it is left unchanged. c: A 4D array ...

Read More

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 191 Views

To evaluate a 3-D Hermite_e series on the Cartesian product of x, y and z, use the hermite_e.hermegrid3d(x, y, z, c) method in Python. The method returns the values of the three dimensional polynomial at points in the Cartesian product of x, y and z. Syntax numpy.polynomial.hermite_e.hermegrid3d(x, y, z, c) Parameters The parameters are x, y, z − The three dimensional series is evaluated at the points in the Cartesian product of x, y, and z. If x, y, or z is a list or tuple, it is first converted to an ndarray, otherwise ...

Read More

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 220 Views

To evaluate a 2-D Hermite_e series on the Cartesian product of x and y, use the hermite_e.hermegrid2d() method in Python. This method evaluates a two-dimensional Hermite_e polynomial at points formed by the Cartesian product of two arrays. Syntax numpy.polynomial.hermite_e.hermegrid2d(x, y, c) Parameters x, y − Arrays representing the coordinates. The series is evaluated at points in the Cartesian product of x and y c − Array of coefficients ordered so that coefficients for terms of degree i, j are in c[i, j] Basic Example Let's start with a simple example ...

Read More

Differentiate a Hermite_e series with multidimensional coefficients over axis 1 in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 183 Views

To differentiate a Hermite_e series with multidimensional coefficients, use the hermite_e.hermeder() method in Python. This method allows you to compute derivatives across specific axes of multidimensional coefficient arrays. Parameters The hermite_e.hermeder() method accepts the following parameters: c: Array of Hermite_e series coefficients. For multidimensional arrays, different axes correspond to different variables m: Number of derivatives (default: 1). Must be non-negative scl: Scalar multiplier applied to each differentiation (default: 1) axis: Axis over which the derivative is taken (default: 0) Example: Differentiating Along Axis 1 Let's create a multidimensional coefficient array and differentiate along ...

Read More

Differentiate a Hermite_e series with multidimensional coefficients over specific axis in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 193 Views

To differentiate a Hermite_e series with multidimensional coefficients, use the hermite_e.hermeder() method in Python. This method allows you to compute derivatives along specific axes of multidimensional coefficient arrays. Syntax numpy.polynomial.hermite_e.hermeder(c, m=1, scl=1, axis=0) Parameters The method accepts the following parameters ? c − Array of Hermite_e series coefficients. For multidimensional arrays, 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 ...

Read More

Multiply a Chebyshev series by an independent variable in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 233 Views

To multiply a Chebyshev series by an independent variable, use the polynomial.chebyshev.chebmulx() method in NumPy. This method multiplies the Chebyshev polynomial by the variable x, effectively increasing the degree by 1. Syntax numpy.polynomial.chebyshev.chebmulx(c) Parameters c − 1-D array of Chebyshev series coefficients ordered from low to high degree. Basic Example Let's start with a simple example to understand how chebmulx() works ? import numpy as np from numpy.polynomial import chebyshev as C # Create a simple Chebyshev series [1, 2, 3] # This represents: 1*T0(x) + 2*T1(x) + 3*T2(x) ...

Read More

Subtract one Chebyshev series from another in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 192 Views

To subtract one Chebyshev series from another, use the polynomial.chebyshev.chebsub() method in NumPy. The method returns an array of Chebyshev series coefficients representing their difference c1 - c2. The sequences of coefficients are ordered from lowest to highest order term, i.e., [1, 2, 3] represents the series T_0 + 2*T_1 + 3*T_2. Syntax numpy.polynomial.chebyshev.chebsub(c1, c2) Parameters The parameters c1 and c2 are 1-D arrays of Chebyshev series coefficients ordered from low to high degree terms. Basic Example Let's start with a simple example of subtracting two Chebyshev series ? import ...

Read More

Add one Chebyshev series to another in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 180 Views

To add one Chebyshev series to another, use the polynomial.chebyshev.chebadd() method in Python NumPy. The method returns an array representing the Chebyshev series of their sum. The arguments are sequences of coefficients ordered from lowest order term to highest, i.e., [1, 2, 3] represents the series T_0 + 2*T_1 + 3*T_2. Syntax numpy.polynomial.chebyshev.chebadd(c1, c2) Parameters c1, c2 − 1-D arrays of Chebyshev series coefficients ordered from low to high. Basic Example Let's start with a simple example of adding two Chebyshev series ? import numpy as np from numpy.polynomial import ...

Read More
Showing 2171–2180 of 25,466 articles
« Prev 1 216 217 218 219 220 2547 Next »
Advertisements