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.

filter_none

edit
close

play_arrow

link
brightness_4
code

# 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)

chevron_right


Output :

-7.0



Example #2 :

filter_none

edit
close

play_arrow

link
brightness_4
code

# 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)

chevron_right


Output :

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

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.