Python | Numpy method np.hermefromroots ()



Using the np.hermefromroots() method, we can get the hermiteE row from the given roots using np.hermefromroots () .

Syntax: np.hermefromroots (roots)
Return: Return the hermiteE series.

Example # 1:
In this example, we see that with np.hermefromroots () we can get the hermiteE row from the given roots using this method.

# numpy and hermefromroots imports

import numpy as np

from numpy. polynomial.hermite_e import hermefromroots

 

series = np.array ([ 0.1 , 0.2 , 0.3 , 0.4 , 0.5 ])

# using the np.hermefromroots () method

gfg = hermefromroots (series)

 

print (gfg)

Output:

[-4.7262 17.5774 -9.225 10.85 -1.5 1.]

Example # 2:

# numpy and hermefromroots imports

import numpy as np

from numpy.polynomial.hermite_e import hermefromroots

 

series = np.array ([ 1 , 0 , 0 , 1 , 1 , 0 ])

# using the np.hermefromroots () method

gfg = hermefromroots (series)  

 

print (gfg )

Output:

[24. -48. 63. -31. 18. -3. 1.]