numpy.polynomial.hermite_e.hermevander

numpy.polynomial.hermite_e.hermevander(x, deg)

Vandermonde matrix of given degree.

Returns the Vandermonde matrix of degree deg and sample points x. This isn’t a true Vandermonde matrix because x can be an arbitrary ndarray and the Hermite polynomials aren’t powers. If V is the returned matrix and x is a 2d array, then the elements of V are V[i,j,k] = P_k(x[i,j]), where P_k is the Hermite polynomial of degree k.

Parameters :

x : array_like

Array of points. The values are converted to double or complex doubles. If x is scalar it is converted to a 1D array.

deg : integer

Degree of the resulting matrix.

Returns :

vander : Vandermonde matrix.

The shape of the returned matrix is x.shape + (deg+1,). The last index is the degree.

Examples

>>> from numpy.polynomial.hermite_e import hermevander
>>> x = np.array([-1, 0, 1])
>>> hermevander(x, 3)
array([[ 1., -1.,  0.,  2.],
       [ 1.,  0., -1., -0.],
       [ 1.,  1.,  0., -2.]])

Previous topic

numpy.polynomial.hermite_e.hermefit

This Page