Python| Numpy 多项式 lagline() 方法
np.lagline()
方法用于查找图形为直线的拉盖尔级数。
Syntax : np.lagline(off, scl)
Parameters:
off, scl :[scalar] The specified line is given by off + scl*x.
Return : [ndarray] Laguerre series coefficient array for the resulting line.
代码#1:
# Python program explaining
# numpy.lagline() method
# importing numpy as np
# and numpy.polynomial.laguerre module as geek
import numpy as np
import numpy.polynomial.laguerre as geek
# using np.lagline() method
res = geek.lagline(2, 3)
# Resulting Laguerre series
print (res)
输出:
[ 5 -3]
代码#2:
# Python program explaining
# numpy.lagline() method
# importing numpy as np
# and numpy.polynomial.laguerre module as geek
import numpy as np
import numpy.polynomial.laguerre as geek
# using np.lagline() method
res = geek.lagline(1, 4)
# Resulting laguerre series
print (res)
输出:
[ 5 -4]