Python | Numpy np.hermeweight() method

With the help of np.hermeweight() method, we can get the weight function of hermiteE polynomial by using np.hermeweight() method.

Syntax : np.hermeweight(polynomial)
Return : Return the weight function of hermiteE polynomial.

Example #1 :
In this example we can see that by using np.hermeweight() method, we are able to get the weight function of hermiteE polynomial by using this method.

filter_none

edit
close

play_arrow

link
brightness_4
code

# import numpy and hermeweight
import numpy as np
from numpy.polynomial.hermite_e import hermeweight
  
poly = np.array([0.1, 0.2, 0.3])
  
# using np.hermeweight() method
gfg = hermeweight(poly)
  
print(gfg)

chevron_right


Output :

[0.99501248 0.98019867 0.95599748]



Example #2 :

filter_none

edit
close

play_arrow

link
brightness_4
code

# import numpy and hermeweight
import numpy as np
from numpy.polynomial.hermite_e import hermeweight
  
poly = np.array([1.1, 2.2, 3.3, 4.4])
  
# using np.hermeweight() method
gfg = hermeweight(poly)
  
print(gfg)

chevron_right


Output :

[5.46074427e-01 8.89216175e-02 4.31784001e-03 6.25215038e-05]

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.