# 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 `np.hermvander()` method, we are able to get the pseudo vandermonde matrix of hermite series by using this method.

 `# import numpy and hermvander ` `import` `numpy as np ` `from` `numpy.polynomial.hermite ``import` `hermvander ` ` `  `x ``=` `np.array([``1``, ``2``, ``3``, ``5``, ``7``, ``11``]) ` `deg ``=` `2` ` `  `# using np.hermvander() method ` `gfg ``=` `hermvander(x, deg) ` ` `  `print``(gfg) `

Output :

[[ 1. 2. 2.]
[ 1. 4. 14.]
[ 1. 6. 34.]
[ 1. 10. 98.]
[ 1. 14. 194.]
[ 1. 22. 482.]]

Example #2 :

 `# import numpy and hermvander ` `import` `numpy as np ` `from` `numpy.polynomial.hermite ``import` `hermvander ` ` `  `x ``=` `np.array([``5``, ``10``, ``-``10``, ``-``5``]) ` `deg ``=` `3` ` `  `# using np.hermvander() method ` `gfg ``=` `hermvander(x, deg) ` ` `  `print``(gfg) `

Output :

[[ 1.00e+00 1.00e+01 9.80e+01 9.40e+02]
[ 1.00e+00 2.00e+01 3.98e+02 7.88e+03]
[ 1.00e+00 -2.00e+01 3.98e+02 -7.88e+03]
[ 1.00e+00 -1.00e+01 9.80e+01 -9.40e+02]]

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.