Python| Numpy np.hermweight() 方法
借助np.hermweight()
方法,我们可以通过使用np.hermweight()
方法在 Hermite 级数中应用权重函数得到 Hermite 多项式。
Syntax : np.hermweight(series)
Return : Return the coefficient of hermite polynomial.
示例 #1:
在这个例子中,我们可以看到通过使用np.hermweight()
方法,我们可以通过使用该方法在 Hermite 级数中应用权重函数来获得 Hermite 多项式。
# import numpy and hermweight
import numpy as np
from numpy.polynomial.hermite import hermweight
series = np.array([6, 7, 8, 9, 10])
# using np.hermweight() method
gfg = hermweight(series)
print(gfg)
输出 :
[2.31952283e-16 5.24288566e-22 1.60381089e-28 6.63967720e-36
3.72007598e-44]
示例 #2:
# import numpy and hermweight
import numpy as np
from numpy.polynomial.hermite import hermweight
series = np.array([0, -7, 8, -9, 1])
# using np.hermweight() method
gfg = hermweight(series)
print(gfg)
输出 :
[1.00000000e+00 5.24288566e-22 1.60381089e-28 6.63967720e-36
3.67879441e-01]