Python | Numpy np.legvander() method Last Updated : 31 Dec, 2019 Comments Improve Suggest changes Like Article Like Report np.legvander() method is used to returns the Vandermonde matrix of degree deg and sample points x. Syntax : np.legvander(x, deg) Parameters: x :[ array_like ] Array of points. The dtype is converted to float64 or complex128 depending on whether any of the elements are complex. If x is scalar it is converted to a 1-D array. deg :[int] Degree of the resulting matrix. Return : Return the matrix having size i.e array.size + (degree + 1). Example #1 : In this example we can see that by using np.legvander() method, we are able to get the pseudo-vandermonde matrix using this method. Python3 1=1 # import numpy import numpy as np import numpy.polynomial.legendre as geek # using np.legvander() method ans = geek.legvander((1, 3, 5, 7), 2) print(ans) Output : [[ 1. 1. 1.] [ 1. 3. 13.] [ 1. 5. 37.] [ 1. 7. 73.]] Example #2 : Python3 1=1 # import numpy import numpy as np import numpy.polynomial.legendre as geek ans = geek.legvander((1, 2, 3, 4), 3) print(ans) Output : [[ 1. 1. 1. 1. ] [ 1. 2. 5.5 17. ] [ 1. 3. 13. 63. ] [ 1. 4. 23.5 154. ]] Comment More infoAdvertise with us Next Article Python | Numpy np.legvander() method jana_sayantan Follow Improve Article Tags : Python Python-numpy Python numpy-Mathematical Function Practice Tags : python Similar Reads Python | Numpy np.legvander3d() method np.legvander3d() method is used to returns the Vandermonde matrix of degree deg and sample points x, y and z. Syntax : np.legvander3d(x, y, z, deg) Parameters: x, y, z :[ array_like ] Array of points. The dtype is converted to float64 or complex128 depending on whether any of the elements are comple 2 min read Python | Numpy np.legvander2d() method With the help of np.legvander2d() method, we can get the Pseudo-Vandermonde matrix from given array having degree which is passed as parameter by using np.legvander2d() method. Syntax : np.legvander2d(x, y, deg) Parameters: x, y :[ array_like ] Array of points. The dtype is converted to float64 or c 2 min read Python | Numpy np.legadd() method np.legadd() method is used to add one Legendre series to another.It returns the sum of two Legendre series c1 + c2. Syntax : np.legadd(c1, c2) Parameters: c1, c2 :[ array_like ] 1-D arrays of Legendre series coefficients ordered from low to high. Return : [ndarray] Array representing the Legendre se 1 min read Python | Numpy np.hermvander() method With the help of np.hermvander() method, we can get the pseudo vandermonde matrix from hermite series of given degree by using np.hermvander() method. Syntax : np.hermvander(x, deg) Return : Return the pseudo vandermonde matrix of given degree. Example #1 : In this example we can see that by using n 1 min read Python | Numpy np.hermevander() method With the help of np.hermevander() method, we can get the pseudo vandermonde matrix at a given degree by using np.hermevander() method. Syntax : np.hermevander(x, deg) Return : Return the pseudo vandermonde matrix. Example #1 : In this example we can see that by using np.hermevander() method, we are 1 min read Like