借助np.polydomain()
方法,我們可以得到具有多項式序列值數組([-1,1])的濾波器。
用法:np.polydomain
返回:Return filter of array([-1, 1])
範例1:
# Python program explaining
# numpy.polydomain() method
# import numpy and polydomain
import numpy as np
from numpy.polynomial.polynomial import polydomain
# using np.polydomain() method
for i in range(5):
ans = polydomain + [i, i + 1]
print(ans)
輸出:
[-1 2]
[0 3]
[1 4]
[2 5]
[3 6]
範例2:
# Python program explaining
# numpy.polydomain() method
# import numpy and polydomain
import numpy as np
from numpy.polynomial.polynomial import polydomain
# using np.polydomain() method
for i in range(4):
ans = polydomain + [i-1, i + 1]
print(ans)
輸出:
[-2 2]
[-1 3]
[0 4]
[1 5]
相關用法
- Python Numpy np.fft()用法及代碼示例
- Python numpy.ma.ids()用法及代碼示例
- Python Numpy np.hermeroots()用法及代碼示例
- Python Numpy np.lagvander()用法及代碼示例
- Python Numpy np.lagadd()用法及代碼示例
- Python Numpy np.lagdiv()用法及代碼示例
- Python Numpy np.lagsub()用法及代碼示例
- Python Numpy np.lagmul()用法及代碼示例
- Python Numpy np.hermegrid2d()用法及代碼示例
- Python Numpy np.lagone()用法及代碼示例
- Python Numpy np.lagzero()用法及代碼示例
- Python Numpy np.lagcompanion()用法及代碼示例
- Python Numpy np.lag2poly()用法及代碼示例
- Python Numpy np.hermegrid3d()用法及代碼示例
- Python Numpy np.hermefromroots()用法及代碼示例
注:本文由純淨天空篩選整理自jana_sayantan大神的英文原創作品 Python | Numpy np.polydomain() method。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。