📜  Python| Numpy 多项式 legline() 方法

📅  最后修改于: 2022-05-13 01:55:22.331000             🧑  作者: Mango

Python| Numpy 多项式 legline() 方法

np.legline()方法用于查找其图形为直线的勒让德级数

代码#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)  
输出:
[2 3]

代码#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)
输出:
[1 4]