Saturday, November 16, 2024
Google search engine
HomeLanguagesPython | Numpy polynomial legline() method

Python | Numpy polynomial legline() method

np.legline() method is used to find a Legendre series whose graph is a straight line.

Syntax : np.legline(off, scl)
Parameters:
off, scl :[scalar] The specified line is given by off + scl*x.

Return : [ndarray] Legendre series coefficient array for the resulting line.

Code #1 :




# Python program explaining 
# numpy.legline() method  
      
# importing numpy as np   
# and numpy.polynomial.legendre module as geek  
import numpy as np  
import numpy.polynomial.legendre as geek 
      
# using np.legline() method  
res = geek.legline(2, 3)  
    
# Resulting legendre series 
print (res)  


Output:

[2 3]

 

Code #2 :




# Python program explaining 
# numpy.legline() method  
      
# importing numpy as np   
# and numpy.polynomial.legendre module as geek  
import numpy as np  
import numpy.polynomial.legendre as geek 
      
  
# using np.legline() method  
res = geek.legline(1, 4)  
    
# Resulting legendre series 
print (res)


Output:

[1 4]

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments