Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Programming Articles
Page 193 of 2547
Evaluate a Chebyshev series at points x in Python
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 MoreRaise a Chebyshev series to a power in Python
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 MoreDivide one Chebyshev series by another in Python
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 MoreEvaluate a Hermite_e series at array of points x in Python
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 MoreMultiply one Chebyshev series to another in Python
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 MoreRaise a Hermite_e series to a power in Python
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 MoreDifferentiate a Legendre series and set the derivatives in Python
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 MoreEvaluate a Legendre series at multidimensional array of points x in Python
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 MoreDifferentiate a Legendre series with multidimensional coefficients in Python
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 MoreEvaluate a 2-D Hermite_e series at points (x,y) with 3D array of coefficient in Python
To evaluate a 2D Hermite_e series at points (x, y), use the hermeval2d() method from NumPy's polynomial module. This function evaluates a two-dimensional Hermite_e polynomial at specified coordinate pairs. Syntax numpy.polynomial.hermite_e.hermeval2d(x, y, c) Parameters The function accepts three parameters: x, y − Arrays of coordinates where x and y must have the same shape. The series is evaluated at points (x, y) c − Array of coefficients where c[i, j] contains the coefficient for the term of multidegree i, j. For higher dimensions, remaining indices represent multiple coefficient sets Example ...
Read More