Open In App

Python | Numpy polynomial lagline() method

Last Updated : 30 Jan, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

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]


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads