Wednesday, November 27, 2024
Google search engine
HomeLanguagesPython | Numpy np.herme2poly() method

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.




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


Output :

[1.3 -1. -2.7 0.4 0.5]

Example #2 :




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


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]

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments