Python | Numpy np.herme2poly() method

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

Syntax : np.herme2poly(series)
Return : Return the coefficients of polynomial.

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

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output :

[1.3 -1. -2.7 0.4 0.5]



Example #2 :

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output :

[-4.4300e+02 3.5720e+02 2.2413e+03 -4.8320e+02 -1.5136e+03 1.4700e+02
3.0670e+02 -1.4200e+01 -2.2200e+01 4.0000e-01 5.0000e-01]

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.