Open In App

Python | Numpy np.hermeroots() method

Last Updated : 11 Dec, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
With the help of np.hermeroots() method, we can get the roots of hermiteE series by using np.hermeroots() method.
Syntax : np.hermeroots(series) Return : Return the roots of hermiteE series.
Example #1 : In this example we can see that by using np.hermeroots() method, we are able to get the roots from hermiteE series by using this method. Python3 1=1
# import numpy and hermeroots
import numpy as np
from numpy.polynomial.hermite_e import hermeroots

series = np.array([1, 2, 3, 4, 5])
# using np.hermeroots() method
gfg = hermeroots(series)

print(gfg)
Output :
[-2.48126206 -0.91457252 0.56384744 2.03198714]
Example #2 : Python3 1=1
# import numpy and hermeroots
import numpy as np
from numpy.polynomial.hermite_e import hermeroots

series = np.array([1, 0, 0, 1, 1, 0])
# using np.hermeroots() method
gfg = hermeroots(series)

print(gfg)
Output :
[-2.62826298 -1.12025529 0.6462188 2.10229947]

Next Article

Similar Reads