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 Laguerre 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 Laguerre polynomial of degree k.
Parameters : | x : array_like
deg : integer
|
---|---|
Returns : | vander : Vandermonde matrix.
|
Examples
>>> from numpy.polynomial.laguerre import lagvander
>>> x = np.array([0, 1, 2])
>>> lagvander(x, 3)
array([[ 1. , 1. , 1. , 1. ],
[ 1. , 0. , -0.5 , -0.66666667],
[ 1. , -1. , -1. , -0.33333333]])