Python | Numpy np.legvander3d() method Last Updated : 31 Dec, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 complex. If x is scalar it is converted to a 1-D array. deg :[int] Degree of the resulting matrix. Return : Return the Vandermonde matrix. Example #1 : In this example we can see that by using np.legvander3d() 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.legvander3d() method ans = geek.legvander3d((1, 3, 5), (2, 4, 6), (1, 2, 3), [2, 2, 2]) print(ans) Output : [[ 1.00000000e+00 1.00000000e+00 1.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 5.50000000e+00 5.50000000e+00 5.50000000e+00 1.00000000e+00 1.00000000e+00 1.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 5.50000000e+00 5.50000000e+00 5.50000000e+00 1.00000000e+00 1.00000000e+00 1.00000000e+00 2.00000000e+00 2.00000000e+00 2.00000000e+00 5.50000000e+00 5.50000000e+00 5.50000000e+00] [ 1.00000000e+00 2.00000000e+00 5.50000000e+00 4.00000000e+00 8.00000000e+00 2.20000000e+01 2.35000000e+01 4.70000000e+01 1.29250000e+02 3.00000000e+00 6.00000000e+00 1.65000000e+01 1.20000000e+01 2.40000000e+01 6.60000000e+01 7.05000000e+01 1.41000000e+02 3.87750000e+02 1.30000000e+01 2.60000000e+01 7.15000000e+01 5.20000000e+01 1.04000000e+02 2.86000000e+02 3.05500000e+02 6.11000000e+02 1.68025000e+03] [ 1.00000000e+00 3.00000000e+00 1.30000000e+01 6.00000000e+00 1.80000000e+01 7.80000000e+01 5.35000000e+01 1.60500000e+02 6.95500000e+02 5.00000000e+00 1.50000000e+01 6.50000000e+01 3.00000000e+01 9.00000000e+01 3.90000000e+02 2.67500000e+02 8.02500000e+02 3.47750000e+03 3.70000000e+01 1.11000000e+02 4.81000000e+02 2.22000000e+02 6.66000000e+02 2.88600000e+03 1.97950000e+03 5.93850000e+03 2.57335000e+04]] Example #2 : Python3 1=1 # import numpy import numpy as np import numpy.polynomial.legendre as geek ans = geek.legvander3d((1, 2), (3, 4), (5, 6), [3, 3, 3]) print(ans) Output : [[ 1.00000000e+00 5.00000000e+00 3.70000000e+01 3.05000000e+02 3.00000000e+00 1.50000000e+01 1.11000000e+02 9.15000000e+02 1.30000000e+01 6.50000000e+01 4.81000000e+02 3.96500000e+03 6.30000000e+01 3.15000000e+02 2.33100000e+03 1.92150000e+04 1.00000000e+00 5.00000000e+00 3.70000000e+01 3.05000000e+02 3.00000000e+00 1.50000000e+01 1.11000000e+02 9.15000000e+02 1.30000000e+01 6.50000000e+01 4.81000000e+02 3.96500000e+03 6.30000000e+01 3.15000000e+02 2.33100000e+03 1.92150000e+04 1.00000000e+00 5.00000000e+00 3.70000000e+01 3.05000000e+02 3.00000000e+00 1.50000000e+01 1.11000000e+02 9.15000000e+02 1.30000000e+01 6.50000000e+01 4.81000000e+02 3.96500000e+03 6.30000000e+01 3.15000000e+02 2.33100000e+03 1.92150000e+04 1.00000000e+00 5.00000000e+00 3.70000000e+01 3.05000000e+02 3.00000000e+00 1.50000000e+01 1.11000000e+02 9.15000000e+02 1.30000000e+01 6.50000000e+01 4.81000000e+02 3.96500000e+03 6.30000000e+01 3.15000000e+02 2.33100000e+03 1.92150000e+04] [ 1.00000000e+00 6.00000000e+00 5.35000000e+01 5.31000000e+02 4.00000000e+00 2.40000000e+01 2.14000000e+02 2.12400000e+03 2.35000000e+01 1.41000000e+02 1.25725000e+03 1.24785000e+04 1.54000000e+02 9.24000000e+02 8.23900000e+03 8.17740000e+04 2.00000000e+00 1.20000000e+01 1.07000000e+02 1.06200000e+03 8.00000000e+00 4.80000000e+01 4.28000000e+02 4.24800000e+03 4.70000000e+01 2.82000000e+02 2.51450000e+03 2.49570000e+04 3.08000000e+02 1.84800000e+03 1.64780000e+04 1.63548000e+05 5.50000000e+00 3.30000000e+01 2.94250000e+02 2.92050000e+03 2.20000000e+01 1.32000000e+02 1.17700000e+03 1.16820000e+04 1.29250000e+02 7.75500000e+02 6.91487500e+03 6.86317500e+04 8.47000000e+02 5.08200000e+03 4.53145000e+04 4.49757000e+05 1.70000000e+01 1.02000000e+02 9.09500000e+02 9.02700000e+03 6.80000000e+01 4.08000000e+02 3.63800000e+03 3.61080000e+04 3.99500000e+02 2.39700000e+03 2.13732500e+04 2.12134500e+05 2.61800000e+03 1.57080000e+04 1.40063000e+05 1.39015800e+06]] Comment More infoAdvertise with us Next Article Python | Numpy np.hermevander2d() method J jana_sayantan Follow Improve Article Tags : Python Python-numpy Python numpy-Mathematical Function Practice Tags : python Similar Reads Python | Numpy np.legvander() method 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 c 1 min read Python | Numpy np.lagvander3d() method np.lagvander3d() method is used to returns the Vandermonde matrix of degree deg and sample points x, y and z. Syntax : np.lagvander3d(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.hermvander3d() method With the help of np.hermvander3d() method, we can get the 3-D pseudo vandermonde matrix from hermite series of given degree by using np.hermvander3d() method. Syntax : np.hermvander3d(x, y, z, deg) Return : Return the 3-D pseudo vandermonde matrix of given degree. Example #1 : In this example we can 2 min read Python | Numpy np.hermevander3d() method With the help of np.hermevander3d() method, we can get the pseudo vandermonde matrix of a given 3-D data having degrees x, y and z by using np.hermevander3d() method. Syntax : np.hermevander3d(x, y, z, [x_deg, y_deg, z_deg]) Return : Return the pseudo vandermonde matrix of given 3-D data. Example #1 2 min read Python | Numpy np.hermevander2d() method With the help of np.hermevander2d() method, we can get the pseudo vandermonde matrix of a given 2-D data having degrees x and y by using np.hermevander2d() method. Syntax : np.hermevander2d(x, y, [x_deg, y_deg]) Return : Return the pseudo vandermonde matrix of given 2-D data. Example #1 : In this ex 2 min read Python | Numpy np.lagval3d() method With the help of np.lagval3d() method, we can get the 3-D laguerre series at point x by using np.lagval3d() method. Syntax : np.lagval3d(x, y, z, c) Return : Return the 3-D laguerre series at point x, y and z. Example #1 : In this example we can see that by using np.lagval3d() method, we are able to 1 min read Like