Python | The numpy np.hermeroots () method

NumPy | Python Methods and Functions

Using the np.hermeroots() method, we can get the roots of the hermiteE row using np.hermeroots () .

Syntax: np.hermeroots (series)
Return: Return the roots of hermiteE series.

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

# numy and hermeroots imports

import numpy as np

from numpy.polynomial .hermite_e import hermeroots

 

series = np.array ([ 1 , 2 , 3 , 4 , 5 ])

# using the np.hermeroots () method

gfg = hermeroots (series)

 

print (gfg)

Output:

[-2.48126206 -0.91457252 0.56384744 2.03198714]

Example # 2:

# numy and hermeroots imports

import numpy as np

from numpy.polynomial.hermite_e import hermeroots

 

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

# using the np.hermeroots () method

gfg = hermeroots (series)

 

print (gfg)

Output:

[-2.62826298 -1.12025529 0.6462188 2.10229947]





Get Solution for free from DataCamp guru