Programming Articles

Page 212 of 2547

Raise a Hermite series to a power in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 207 Views

To raise a Hermite series to a power, use the polynomial.hermite.hermpow() method in NumPy. This method returns a Hermite series 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 P_0 + 2*P_1 + 3*P_2. Syntax numpy.polynomial.hermite.hermpow(c, pow, maxpower=16) Parameters The function accepts the following parameters: c: 1-D array of Hermite 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 ...

Read More

Divide one Hermite series by another in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 167 Views

To divide one Hermite series by another, use the polynomial.hermite.hermdiv() method in Python NumPy. The method returns a tuple containing two arrays: the quotient and remainder of the division. 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.hermdiv(c1, c2) Parameters: c1, c2: 1-D arrays of Hermite series coefficients ordered from low to high degree Returns: A tuple (quotient, remainder) where both are arrays of Hermite series coefficients. Example Let's divide two Hermite series ...

Read More

Multiply one Hermite series to another in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 162 Views

To multiply one Hermite series to another, use the polynomial.hermite.hermmul() method in Python NumPy. This method returns an array representing the Hermite series of their product. The arguments are sequences of coefficients ordered from lowest to highest degree, e.g., [1, 2, 3] represents the series P_0 + 2*P_1 + 3*P_2. Syntax numpy.polynomial.hermite.hermmul(c1, c2) Parameters c1, c2: 1-D arrays of Hermite series coefficients ordered from low to high degree. Return Value Returns a 1-D array representing the coefficients of the product Hermite series. Example Let's multiply two Hermite series using coefficient ...

Read More

Multiply a Hermite series by an independent variable in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 176 Views

To multiply the Hermite series by x, where x is the independent variable, use the polynomial.hermite.hermmulx() method in Python NumPy. The method returns an array representing the result of the multiplication. The parameter c is a 1-D array of Hermite series coefficients ordered from low to high. Syntax numpy.polynomial.hermite.hermmulx(c) Parameters c: A 1-D array of Hermite series coefficients ordered from low to high degree. Example Let's create a simple example to demonstrate the multiplication of a Hermite series by the independent variable ? import numpy as np from numpy.polynomial import ...

Read More

Get the Least squares fit of Chebyshev series to data in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 670 Views

To get the least-squares fit of Chebyshev series to data, use the chebyshev.chebfit() function in NumPy. This method returns Chebyshev coefficients ordered from low to high, allowing you to fit polynomial approximations to your data using Chebyshev polynomials. Syntax numpy.polynomial.chebyshev.chebfit(x, y, deg, rcond=None, full=False, w=None) Parameters The function accepts the following parameters: x − The x-coordinates of the M sample points (x[i], y[i]) y − The y-coordinates of the sample points. Can be 2-D array for multiple data sets deg − Degree(s) of the fitting polynomials. If integer, includes all terms up ...

Read More

Differentiate a polynomial with multidimensional coefficients in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 302 Views

To differentiate a polynomial with multidimensional coefficients, use the polynomial.polyder() method in NumPy. This function differentiates polynomial coefficients c along a specified axis, returning the derivative coefficients. The coefficient array represents polynomials where [1, 2, 3] means 1 + 2*x + 3*x², while [[1, 2], [1, 2]] represents 1 + 1*x + 2*y + 2*x*y if axis=0 is x and axis=1 is y. Syntax numpy.polynomial.polynomial.polyder(c, m=1, scl=1, axis=0) Parameters The function accepts the following parameters ? c − Array of polynomial coefficients (multidimensional arrays correspond to different variables) m − Number ...

Read More

Generate a Pseudo-Vandermonde matrix of given degree with complex array of points coordinates in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 175 Views

To generate a Pseudo-Vandermonde matrix of given degree with complex coordinates, use the polyvander2d() function from NumPy's polynomial module. This function creates a 2D Vandermonde matrix from arrays of point coordinates with specified maximum degrees for each dimension. Syntax numpy.polynomial.polynomial.polyvander2d(x, y, deg) Parameters x, y: Arrays of point coordinates with the same shape. Complex values are supported. deg: List of maximum degrees in the form [x_deg, y_deg]. Example Let's create a Pseudo-Vandermonde matrix using complex coordinate arrays ? import numpy as np from numpy.polynomial.polynomial import polyvander2d # Create arrays ...

Read More

Generate a Pseudo-Vandermonde matrix of given degree with float array of points coordinates in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 167 Views

To generate a Pseudo-Vandermonde matrix of given degree, use the polynomial.polyvander2d() in Python NumPy. The method returns the pseudo-Vandermonde matrix of degrees deg and sample points (x, y). The parameters x and y are arrays of point coordinates, all of the same shape. The dtypes will be converted to either float64 or complex128 depending on whether any of the elements are complex. The parameter deg is a list of maximum degrees of the form [x_deg, y_deg]. Syntax numpy.polynomial.polynomial.polyvander2d(x, y, deg) Parameters x, y − Arrays of point coordinates, all of the same shape ...

Read More

Evaluate a Hermite series at points x and the shape of coefficient array extended for each dimension of x in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 185 Views

The Hermite series evaluation in Python NumPy allows you to compute polynomial values at specific points using the hermite.hermval() method. This function is particularly useful when working with multidimensional coefficient arrays and controlling how the evaluation is broadcast across dimensions. Syntax hermite.hermval(x, c, tensor=True) Parameters The hermval() method accepts three parameters: x: Points at which to evaluate the series. Can be a scalar, list, or array c: Coefficient array where c[n] contains coefficients for degree n terms tensor: Controls broadcasting behavior (default: True) Understanding the tensor Parameter When tensor=True, ...

Read More

Subtract one Hermite series from another in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 176 Views

To subtract one Hermite series from another, use the polynomial.hermite.hermsub() method in Python NumPy. The method returns an array representing the Hermite series of their difference. It computes c1 - c2, where the sequences of coefficients are ordered from lowest to highest order terms, i.e., [1, 2, 3] represents the series P_0 + 2*P_1 + 3*P_2. Syntax numpy.polynomial.hermite.hermsub(c1, c2) Parameters c1, c2 − 1-D arrays of Hermite series coefficients ordered from low to high degree. Example Let's create two Hermite series and subtract one from another ? import numpy as ...

Read More
Showing 2111–2120 of 25,469 articles
« Prev 1 210 211 212 213 214 2547 Next »
Advertisements