  # Python | The numpy np.poly2herme () method

NumPy | Python Methods and Functions

Using the `np.poly2herme() ` method, we can get the hermiteE series from a polynomial using ` np.poly2herme () `.

Syntax: ` np.poly2herme (series) `
Return: Return the coefficients of hermiteE series.

Example # 1:
In this example we see that with ` np.poly2herme () ` we can get the coefficients hermiteE series from the polynomial using this method.

 ` # numpy and poly2herme imports ` ` import ` ` numpy as np ` ` from ` ` numpy .polynomial.hermite_e ` ` import ` ` poly2herme `   ` x ` ` = ` ` np.array ([` ` 0.1 ` `, ` ` 0.2 ` `, ` ` 0.3 ` `, ` ` 0.4 ` `]) ` ` # using the np.poly2herme () method ` ` gfg ` ` = ` ` poly2herme (x) `   ` print ` ` (gfg) `

Output:

[0.4 1.4 0.3 0.4]

Example # 2:

 ` # numpy and poly2herme imports ` ` import ` ` numpy as np ` ` from ` ` numpy.polynomial.hermite_e ` ` import ` ` poly2herme `   ` x ` ` = ` ` np.array ([` ` - ` ` 0.5 ` `, ` ` - ` ` 0.4 ` `, ` ` - ` ` 0.3 ` `, ` ` - ` ` 0.2 ` `, ` ` - ` ` 0.1 ` `, ` ` 0 , 0.4 , 0.5 ]) `` # isp Using the np.poly2herme () method gfg = poly2herme (x)    print (gfg) `

Output:

[4.9 51.5 17.1 52.3 5.9 10.5 0.4 0.5]