Python | Numpy polynomial lagline() method
np.lagline()
method is used to find a Laguerre series whose graph is a straight line.
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.
Code #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) |
Output:
[ 5 -3]
Code #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) |
Output:
[ 5 -4]
Contact Us