Python | Numpy np.hermeweight () method

Using the `np.hermeweight() ` method, we can get the hermiteE polynomial weighting function using the ` np.hermeweight () ` method.

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

Example # 1:
In this example, we can see that using ` np.hermeweight () `, we can get the weighting function of the hermiteE polynomial using this method.

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

Output:

[0.99501248 0.98019867 0.95599748]

Example # 2:

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

Output:

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