Python| Numpy np.lagdomain() 方法
借助np.lagdomain()
方法,我们可以得到具有值array([0, 1])的拉盖尔级数的过滤器。
Syntax : np.lagdomain
Return : Return filter of array([0, 1])
示例 #1:
# Python program explaining
# numpy.lagdomain() method
# import numpy and lagdomain
import numpy as np
from numpy.polynomial.laguerre import lagdomain
# using np.lagdomain() method
for i in range(5):
ans = lagdomain + [i, i + 1]
print(ans)
输出 :
[-1 2]
[0 3]
[1 4]
[2 5]
[3 6]
示例 #2:
# Python program explaining
# numpy.lagdomain() method
# import numpy and lagdomain
import numpy as np
from numpy.polynomial.laguerre import lagdomain
# using np.lagdomain() method
for i in range(4):
ans = lagdomain + [i-1, i + 1]
print(ans)
输出 :
[-2 2]
[-1 3]
[0 4]
[1 5]
[2 6]