# Python | Numpy np.poly2herm() method

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

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

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

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

Output :

[0.625 0.4 0.45 0.05 0.03125]

Example #2 :

 `# import numpy and poly2herm ` `import` `numpy as np ` `from` `numpy.polynomial.hermite ``import` `poly2herm ` ` `  `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.poly2herm() method ` `gfg ``=` `poly2herm(x) ` ` `  `print``(gfg) `

Output :

[1.61968750e+01 1.27750000e+01 4.09828125e+01 8.50625000e+00
1.33296875e+01 1.24687500e+00 1.29765625e+00 5.78125000e-02
4.51171875e-02 7.81250000e-04 4.88281250e-04]

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.