Python | Numpy np.hermgauss () method

NumPy | Python Methods and Functions

With the np.hermgauss() method we can get the quadrature value of the Gaussian hermit with np.hermgauss () .

Syntax: np.hermgauss (degree)
Return: Return the quadrature of gaussian hermite.

Example # 1:
In this example we see that using np.hermgauss () we can get square gaussian hermit using this method.

# numpy and hermgauss imports

import numpy as np

 
# using the np.hermgauss () method

gfg = hermgauss ( 3 )

  

print (gfg)

Output:

(array ([- 1.22474487, 0., 1.22474487]), array ([0.29540898, 1.1816359, 0.29540898 ]))

Example # 2:

# numpy and hermgauss imports

import numpy as np

 
# using the np.hermgauss () method

gfg = hermgauss ( 5 )

 

print (gfg)

Output:

(array ([- 2.02018287, -0.95857246, 0., 0.95857246, 2.02018287]), array ([0.01995324, 0.39361932, 0.94530872, 0.39361932, 0.01995324]))





Get Solution for free from DataCamp guru