Open In App

Python | Numpy np.poly2herme() method

Last Updated : 11 Dec, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

With the help of np.poly2herme() method, we can get the hermiteE series from polynomial by using np.poly2herme() method.

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

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




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


Output :

[0.4 1.4 0.3 0.4]

Example #2 :




# import numpy and poly2herme
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])
# using 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]


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads