# Python | Numpy np.herm2poly method

With the help of `np.herm2poly()` method, we can get the polynomial from hermite series by using `np.herm2poly()` method.

Syntax : `np.herm2poly(hermite series)`
Return : Return the coefficient of polynomial.

Example #1 :
In this example we can see that by using `np.herm2poly()` method, we are able to get the coefficients of polynomial from hermite series using this method.

 `# import numpy and herm2poly ` `import` `numpy as np ` `from` `numpy.polynomial.hermite ``import` `herm2poly ` ` `  `x ``=` `np.array([``0.1``, ``0.2``, ``0.3``, ``0.4``, ``0.5``]) ` `# using np.herm2poly() method ` `gfg ``=` `herm2poly(x) ` ` `  `print``(gfg) `

Output :

[5.5 -4.4 -22.8 3.2 8.]

Example #2 :

 `# import numpy and herm2poly ` `import` `numpy as np ` `from` `numpy.polynomial.hermite ``import` `herm2poly ` ` `  `x ``=` `np.array([``-``0.5``, ``-``0.4``, ``-``0.3``, ``-``0.2``, ``-``0.1``, ``0``, ``0.1``, ``0.2``, ``0.3``, ``0.4``, ``0.5``]) ` `# using np.herm2poly() method ` `gfg ``=` `herm2poly(x) ` ` `  `print``(gfg) `

Output :

[-14629.1 11761.6 147243.6 -31585.6 -197617.6 19084.8 79571.2
-3660.8 -11443.2 204.8 512.]

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.