Friday, July 24, 2026
HomeLanguagesPython | Numpy np.lagval() method

Python | Numpy np.lagval() method

With the help of np.lagval() method, we can get the laguerre series at point x by using np.lagval() method.

Syntax : np.lagval(x, c)
Return : Return the laguerre series at point x.

Example #1 :
In this example we can see that by using np.lagval() method, we are able to get the laguerre series at point x by using this method.




# import numpy and lagval
import numpy as np
from numpy.polynomial.laguerre import lagval
  
x = 2
c = np.array([3, 10])
  
# import np.lagval() method
gfg = lagval(x, c)
  
print(gfg)


Output :

-7.0

Example #2 :




# import numpy and lagval
import numpy as np
from numpy.polynomial.laguerre import lagval
  
x = np.array([[1, 5], [2, 10]])
c = np.array([3, 1])
  
# import np.lagval() method
gfg = lagval(x, c)
  
print(gfg)


Output :

[[ 3. -1.]
[ 2. -6.]]

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

Most Popular

Dominic
32520 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6902 POSTS0 COMMENTS
Nicole Veronica
12017 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12115 POSTS0 COMMENTS
Shaida Kate Naidoo
7023 POSTS0 COMMENTS
Ted Musemwa
7265 POSTS0 COMMENTS
Thapelo Manthata
6980 POSTS0 COMMENTS
Umr Jansen
6971 POSTS0 COMMENTS