Python | Numpy np.lagfit() method Last Updated : 23 Jan, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of np.lagfit() method, we can get the least squares fit of laguerre series of a given data by using np.lagfit() method. Syntax : np.lagfit(x, y, deg) Return : Return the least squares fit of laguerre series to data. Example #1 : In this example we can see that by using np.lagfit() method, we are able to get the least squares fit of laguerre series of a given data. Python3 1=1 # import numpy and lagfit import numpy as np from numpy.polynomial.laguerre import lagfit x, y = [1, 2], [3, 4] deg = 2 # import np.lagfit() method gfg = lagfit(x, y, deg) print(gfg) Output : [2.125 -0.125 -1.75] Example #2 : Python3 1=1 # import numpy and lagfit import numpy as np from numpy.polynomial.laguerre import lagfit x, y = [1, 2, 3], [3, 4, 5] deg = 3 # import np.lagfit() method gfg = lagfit(x, y, deg) print(gfg) Output : [3.06722689 -0.66386555 -0.40336134 0.40336134] Comment More infoAdvertise with us Next Article Python | Numpy np.lagsub() method J jitender_1998 Follow Improve Article Tags : Python Python-numpy Python numpy-Mathematical Function Practice Tags : python Similar Reads Python | Numpy np.lagint() method With the help of np.lagint() method, we can get the laguerre series in the form of an array by using np.lagint() method. Syntax : np.lagint(array of coefficient) Return : Return the array of laguerre series. Example #1 : In this example we can see that by using np.lagint() method, we are able to get 1 min read Python | Numpy np.lagdiv() method np.lagdiv() method is used to divide one Laguerre series to another.It returns the quotient-with-remainder of two Laguerre series c1 / c2. Syntax : np.lagdiv(c1, c2) Parameters: c1, c2 :[ array_like ] 1-D arrays of Laguerre series coefficients ordered from low to high. Return : [ndarray] Laguerre se 1 min read Python | Numpy np.lagder() method np.lagroots() method is used to differentiate a Laguerre series. Syntax : np.lagder(c, m=1, scl=1, axis=0) Parameters: c :[array_like] 1-D arrays of Laguerre series coefficients ordered from low to high. m :[int, optional] Number of derivatives taken, must be non-negative.Default is 1. scl :[scalar, 1 min read Python | Numpy np.lagmul() method np.lagmul() method is used to multiply one Laguerre series to another.It returns the product of two Laguerre series c1 * c2. Syntax : np.lagmul(c1, c2) Parameters: c1, c2 :[ array_like ] 1-D arrays of Laguerre series coefficients ordered from low to high. Return : [ndarray] Laguerre series coefficie 1 min read Python | Numpy np.lagsub() method np.lagub() method is used to subtract one Laguerre series to another.It returns the difference of two Laguerre series c1 - c2. Syntax : np.lagub(c1, c2) Parameters: c1, c2 :[ array_like ] 1-D arrays of Laguerre series coefficients ordered from low to high. Return : [ndarray] Laguerre series coeffici 1 min read Python | Numpy np.lagone() method np.lagone() method can be used instead of np.ones for creating a array whose elements are 1. Syntax : np.lagone() Return : Return array([1]) Example #1 : Python3 1=1 # Python program explaining # numpy.lagone() method # import numpy and lagone import numpy as np from numpy.polynomial.laguerre import 1 min read Like