Thursday, October 2, 2025
HomeLanguagesPython | Numpy np.poly2lag() method

Python | Numpy np.poly2lag() method

With the help of np.poly2lag() method, we can get the laguerre series coefficient from a given polynomial.

Syntax : np.poly2lag(polynomial)
Return : Return the coefficient of laguerre series.

Example #1 :
In this example we can see that by using np.poly2lag() method, we are able to get the coefficients of laguerre series from polynomial using this method.




# import numpy and poly2lag
import numpy as np
from numpy.polynomial.laguerre import poly2lag
  
arr = np.array([0.1, 0.2, 0.3, 0.4, 0.5])
# using np.poly2lag() method
ans = poly2lag(arr)
  
print(ans)


Output :

[ 15.3 -56.6 79.8 -50.4 12. ]

Example #2 :




# import numpy and poly2lag
import numpy as np
from numpy.polynomial.laguerre import poly2lag
  
arr = np.array([-0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.2, 0.3, 0.4, 0.5])
# using np.poly2lag() method
ans = poly2lag(arr)
  
print(ans)


Output :

[ 1.97272290e+06 -1.95546092e+07 8.72343894e+07 -2.30634853e+08
4.00196230e+08 -4.76216928e+08 3.93562584e+08 -2.23051248e+08
8.29664640e+07 -1.82891520e+07 1.81440000e+06]

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

Most Popular

Dominic
32331 POSTS0 COMMENTS
Milvus
85 POSTS0 COMMENTS
Nango Kala
6703 POSTS0 COMMENTS
Nicole Veronica
11867 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11927 POSTS0 COMMENTS
Shaida Kate Naidoo
6818 POSTS0 COMMENTS
Ted Musemwa
7080 POSTS0 COMMENTS
Thapelo Manthata
6775 POSTS0 COMMENTS
Umr Jansen
6776 POSTS0 COMMENTS