Python | Numpy np.poly2herme() method

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.



filter_none

edit
close

play_arrow

link
brightness_4
code

# 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)

chevron_right


Output :

[0.4 1.4 0.3 0.4]

Example #2 :

filter_none

edit
close

play_arrow

link
brightness_4
code

# 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)

chevron_right


Output :

[ 4.9 51.5 17.1 52.3 5.9 10.5 0.4 0.5]



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.