Numpy Articles

Page 35 of 81

Generate a Pseudo-Vandermonde matrix of given degree and x, y, z floating array of points in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 200 Views

To generate a Vandermonde matrix of given degree and sample points (x, y, z), use the polynomial.polyvander3d() in Python NumPy. The method returns the pseudo-Vandermonde matrix of degrees deg and sample points (x, y, z). The parameter, x, y, z are the 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. Scalars are converted to 1-D arrays. The parameter, deg is the list of maximum degrees of the form [x_deg, y_deg, z_deg]. Syntax numpy.polynomial.polynomial.polyvander3d(x, y, z, deg) ...

Read More

Generate a Pseudo-Vandermonde matrix of given degree and x, y, z sample points in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 183 Views

To generate a pseudo Vandermonde matrix of given degree and x, y, z sample points, use the polynomial.polyvander3d() function in NumPy. This method returns a pseudo-Vandermonde matrix of degrees deg and sample points (x, y, z). The parameters x, y, z are arrays of point coordinates with the same shape, and deg is a list of maximum degrees of the form [x_deg, y_deg, z_deg]. Syntax numpy.polynomial.polynomial.polyvander3d(x, y, z, deg) Parameters x, y, z: Arrays of point coordinates, all of the same shape. The dtypes will be converted to either float64 or complex128 depending on ...

Read More

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

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 237 Views

To generate a Vandermonde matrix of given degree with complex array points, use the numpy.polynomial.polynomial.polyvander() function. This method returns a Vandermonde matrix where each column represents successive powers of the input array elements. The polyvander() function takes an array of points and a degree parameter. The shape of the returned matrix is x.shape + (deg + 1, ), where the last index represents the power of x. The dtype will be the same as the converted input array. Syntax numpy.polynomial.polynomial.polyvander(x, deg) Parameters x: Array of points. The dtype is converted to float64 or ...

Read More

Generate a Vandermonde matrix of given degree in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 673 Views

To generate a Vandermonde matrix of given degree, use the polynomial.polyvander() function in Python NumPy. The method returns the Vandermonde matrix where each row represents the powers of the corresponding input value. The shape of the returned matrix is x.shape + (deg + 1, ), where the last index is the power of x. Syntax numpy.polynomial.polynomial.polyvander(x, deg) Parameters The function accepts the following parameters ? x ? Array of points. The dtype is converted to float64 or complex128 depending on whether any elements are complex. If x is scalar, it is converted ...

Read More

Evaluate a polynomial at points x and x is broadcast over the columns of r for the evaluation in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 240 Views

To evaluate a polynomial specified by its roots at points x, use the polynomial.polyvalfromroots() method in Python NumPy. This method allows you to evaluate polynomials defined by their roots rather than coefficients, with flexible broadcasting options for multidimensional arrays. Parameters The polyvalfromroots() method accepts three parameters ? x − The evaluation points. Can be a scalar, list, or array r − Array of roots. For multidimensional arrays, the first index represents root index, remaining indices enumerate multiple polynomials tensor − Boolean flag controlling broadcasting behavior. Default is True Understanding the tensor Parameter The ...

Read More

Evaluate a polynomial and every column of coefficients in r is evaluated for every element of x in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 264 Views

The polyvalfromroots() method in NumPy evaluates polynomials specified by their roots at given points. When working with multidimensional arrays, the tensor parameter controls how evaluation is performed across columns. Syntax numpy.polynomial.polynomial.polyvalfromroots(x, r, tensor=True) Parameters x: Array of points where the polynomial is evaluated. Can be scalar, list, or array. r: Array of roots. If multidimensional, first index is the root index, remaining indices enumerate multiple polynomials. tensor: Boolean parameter controlling evaluation behavior ? True (default): Every column of coefficients in r is evaluated for every element of x False: x ...

Read More

Evaluate a polynomial at points x with multidimensioanl array of roots in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 259 Views

To evaluate a polynomial specified by its roots at points x, use the polynomial.polyvalfromroots() method in Python NumPy. This function takes the roots of a polynomial and evaluates the resulting polynomial at given points. Syntax numpy.polynomial.polynomial.polyvalfromroots(x, r, tensor=True) Parameters The function accepts three parameters ? x ? Points at which to evaluate the polynomial. Can be a scalar, list, tuple, or ndarray r ? Array of roots. For multidimensional arrays, the first index represents the root index tensor ? Boolean flag controlling evaluation behavior for multidimensional roots (default: True) Understanding ...

Read More

Differentiate a Hermite_e series and set the derivatives in Python

Niharika Aitam
Niharika Aitam
Updated on 26-Mar-2026 241 Views

The Hermite_e series (probabilist's Hermite polynomials) is a mathematical series used in quantum mechanics and probability theory. The weight function is e^(−x²/2). This guide shows how to differentiate Hermite_e series using NumPy's polynomial module. Formula The Hermite_e polynomial formula is: H_n(x) = (−1)^n e^(x²/2) d^n/dx^n(e^(−x²/2)) Where: H_n(x) is the nth Hermite polynomial of degree n x is the independent variable d^n/dx^n denotes the nth derivative with respect to x Basic Hermite_e Series Differentiation To differentiate a Hermite_e series, use hermite_e.hermeder() function with coefficient arrays ? import numpy as np ...

Read More

Differentiate a Hermite_e series with multidimensional coefficients in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 214 Views

To differentiate a Hermite_e series with multidimensional coefficients, use the hermite_e.hermeder() method in Python. This method can handle arrays where different axes correspond to different variables. 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. 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 over which the derivative is taken (Default: 0) ...

Read More

Differentiate a Hermite_e series in Python

AmitDiwan
AmitDiwan
Updated on 26-Mar-2026 213 Views

To differentiate a Hermite_e series, use the hermite_e.hermeder() method in Python. This function computes the derivative of a Hermite_e polynomial series represented by its coefficients. Syntax numpy.polynomial.hermite_e.hermeder(c, m=1, scl=1, axis=0) Parameters The function accepts the following parameters: c − Array of Hermite_e series coefficients. If multidimensional, different axes correspond to different variables m − Number of derivatives to take (default: 1). Must be non-negative scl − Scalar multiplier for each differentiation (default: 1) axis − Axis over which the derivative is taken (default: 0) Example Let's differentiate a Hermite_e ...

Read More
Showing 341–350 of 802 articles
« Prev 1 33 34 35 36 37 81 Next »
Advertisements