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

AmitDiwan
Updated on 26-Mar-2026 21:10:22

250 Views

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 and returns the corresponding values. Syntax numpy.polynomial.hermite_e.hermeval2d(x, y, c) Parameters The function accepts three parameters: x, y: The coordinate arrays where the polynomial is evaluated. They must have the same shape. c: Array of coefficients ordered so that the coefficient of term with multi-degree i, j is in c[i, j]. Example Let's create a 1D coefficient array and evaluate the ... Read More

Divide one Hermite_e series by another in Python

AmitDiwan
Updated on 26-Mar-2026 21:10:05

204 Views

To divide one Hermite_e series by another, use the polynomial.hermite_e.hermediv() method in Python NumPy. The method returns a tuple containing the quotient and remainder as arrays of Hermite_e series coefficients. The method performs polynomial long division on two Hermite_e series c1 / c2, where the arguments are sequences of coefficients from lowest order "term" to highest. For example, [1, 2, 3] represents the series P_0 + 2*P_1 + 3*P_2. Syntax numpy.polynomial.hermite_e.hermediv(c1, c2) Parameters c1, c2: 1-D arrays of Hermite_e series coefficients ordered from low to high degree. Return Value Returns a ... Read More

Multiply one Hermite_e series to another in Python

AmitDiwan
Updated on 26-Mar-2026 21:09:49

292 Views

To multiply one Hermite_e series to another, use the polynomial.hermite_e.hermemul() method in Python NumPy. The method returns an array representing the Hermite_e series of their product. The arguments are sequences of coefficients, from lowest order "term" to highest, e.g., [1, 2, 3] represents the series P_0 + 2*P_1 + 3*P_2. Syntax numpy.polynomial.hermite_e.hermemul(c1, c2) Parameters The parameters are 1-D arrays of Hermite_e series coefficients ordered from low to high ? c1, c2 − 1-D arrays of Hermite_e polynomial coefficients Example Let's multiply two Hermite_e series using coefficient arrays ? ... Read More

Integrate a Legendre series and set the order of integration in Python

AmitDiwan
Updated on 26-Mar-2026 21:09:35

231 Views

To integrate a Legendre series, use the polynomial.legendre.legint() method in Python. The method returns the Legendre series coefficients integrated m times from lbnd along axis. At each iteration the resulting series is multiplied by scl and an integration constant k is added. Syntax numpy.polynomial.legendre.legint(c, m=1, k=[], lbnd=0, scl=1, axis=0) Parameters The parameters for legint() method are ? c − Array of Legendre series coefficients. If c is multidimensional, different axes correspond to different variables m − Order of integration, must be positive (Default: 1) k − Integration constant(s). The value of the ... Read More

Integrate a Legendre series in Python

AmitDiwan
Updated on 26-Mar-2026 21:09:12

387 Views

To integrate a Legendre series, use the polynomial.legendre.legint() method in Python. The method returns the Legendre series coefficients c integrated m times from lbnd along axis. At each iteration the resulting series is multiplied by scl and an integration constant k is added. Syntax numpy.polynomial.legendre.legint(c, m=1, k=[], lbnd=0, 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: Order of integration, must be positive (Default: 1) k: Integration constant(s). If empty list (default), all constants are set to ... Read More

Differentiate a Legendre series, set the derivatives and multiply each differentiation by a scalar in Python

AmitDiwan
Updated on 26-Mar-2026 21:08:51

236 Views

To differentiate a Legendre series in Python, use the polynomial.legendre.legder() method. This function returns the Legendre series coefficients differentiated m times along the specified axis, with each differentiation multiplied by a scalar value. 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. For multidimensional arrays, different axes correspond to different variables m − Number of derivatives to take (must be non-negative, default: 1) scl − Scalar multiplier applied to each differentiation (default: 1). Final result is multiplied by scl**m axis − Axis ... Read More

Multiply a Hermite_e series by an independent variable in Python

AmitDiwan
Updated on 26-Mar-2026 21:08:36

187 Views

To multiply a Hermite_e series by the independent variable x, use the hermemulx() method from NumPy's polynomial module. This method takes a 1-D array of Hermite_e series coefficients and returns the result of multiplying the series by x. Syntax numpy.polynomial.hermite_e.hermemulx(c) Parameters c − 1-D array of Hermite_e series coefficients ordered from low to high degree Return Value Returns an array representing the Hermite_e series multiplied by x. Example Let's create a Hermite_e series and multiply it by the independent variable ? import numpy as np from numpy.polynomial import ... Read More

Subtract one Hermite_e series from another in Python

AmitDiwan
Updated on 26-Mar-2026 21:08:19

181 Views

To subtract one Hermite_e series from another, use the polynomial.hermite_e.hermesub() method in Python NumPy. The method returns an array representing the Hermite_e series of their difference (c1 - c2). The sequences of coefficients are ordered from lowest to highest degree term, i.e., [1, 2, 3] represents the series P_0 + 2*P_1 + 3*P_2. Syntax numpy.polynomial.hermite_e.hermesub(c1, c2) Parameters c1, c2: 1-D arrays of Hermite_e series coefficients ordered from low to high degree. Example Let's create two Hermite_e series and subtract one from another ? import numpy as np from numpy.polynomial import ... Read More

Add one Hermite_e series to another in Python

AmitDiwan
Updated on 26-Mar-2026 21:08:03

202 Views

To add one Hermite_e series to another, use the polynomial.hermite_e.hermeadd() method in NumPy. The method returns an array representing the Hermite_e 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 P_0 + 2*P_1 + 3*P_2. Syntax numpy.polynomial.hermite_e.hermeadd(c1, c2) Parameters: c1, c2 − 1-D arrays of Hermite_e series coefficients ordered from low to high Returns: Array representing the sum of the two Hermite_e series Example Let's create two Hermite_e series and add them together − ... Read More

Convert a polynomial to Legendre series in Python

AmitDiwan
Updated on 26-Mar-2026 21:07:48

496 Views

To convert a polynomial to a Legendre series, use the legendre.poly2leg() method in Python NumPy. This function converts an array representing the coefficients of a polynomial (ordered from lowest degree to highest) to an array of the coefficients of the equivalent Legendre series. Syntax numpy.polynomial.legendre.poly2leg(pol) Parameters: pol − 1-D array containing the polynomial coefficients ordered from lowest to highest degree Returns: 1-D array containing the coefficients of the equivalent Legendre series. Example Let's convert a polynomial with coefficients [1, 2, 3, 4, 5] to its Legendre series representation ? ... Read More

Advertisements