HomeLanguagesPython | Numpy np.hermfromroots() method

Python | Numpy np.hermfromroots() method

With the help of np.hermfromroots() method, we can get the hermite series coefficient from given roots by using np.hermfromroots() method.

Syntax : np.hermfromroots(roots)
Return : Return the coefficient of hermite series.

Example #1 :
In this example we can see that by using np.hermfromroots() method, we are able to get the coefficient of hermite series from given roots by using this method.




# import numpy and hermfromroot
import numpy as np
from numpy.polynomial.hermite import hermfromroots
  
roots = np.array([0.1, 2, 0.3, 4])
# using np.hermfromroots() method
gfg = hermfromroots(roots)
  
print(gfg)


Output :

[6.205 -6.49 3.3575 -0.8 0.0625]

Example #2 :




# import numpy and hermfromroot
import numpy as np
from numpy.polynomial.hermite import hermfromroots
  
roots = np.array([1, 2, 3, 4, 1.0001])
# using np.hermfromroots() method
gfg = hermfromroots(roots)
  
print(gfg)


Output :

[-7.4754225e+01 7.2628250e+01 -2.9500950e+01 6.2501250e+00
-6.8750625e-01 3.1250000e-02]

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

Most Popular

Dominic
32707 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
7081 POSTS0 COMMENTS
Nicole Veronica
12218 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12306 POSTS0 COMMENTS
Shaida Kate Naidoo
7200 POSTS0 COMMENTS
Ted Musemwa
7460 POSTS0 COMMENTS
Thapelo Manthata
7179 POSTS0 COMMENTS
Umr Jansen
7166 POSTS0 COMMENTS