Python | Numpy np.legdiv() method Last Updated : 31 Dec, 2019 Comments Improve Suggest changes Like Article Like Report np.legdiv() method is used to divide one Legendre series to another.It returns the quotient-with-remainder of two Legendre series c1 / c2. Syntax : np.legdiv(c1, c2) Parameters: c1, c2 :[ array_like ] 1-D arrays of Legendre series coefficients ordered from low to high. Return : [ndarray] Legendre series coefficients representing the quotient and remainder. Code #1 : Python3 # Python program explaining # numpy.legdiv() method # importing numpy as np # and numpy.polynomial.legendre module as geek import numpy as np import numpy.polynomial.legendre as geek # Legendre series coefficients s1 = (2, 4, 8) s2 = (1, 3, 5) # using np.legdiv() method res = geek.legdiv(s1, s2) # Resulting legendre series print (res) Output: (array([ 1.6]), array([ 0.4, -0.8])) Code #2 : Python3 # Python program explaining # numpy.legdiv() method # importing numpy as np # and numpy.polynomial.legendre module as geek import numpy as np import numpy.polynomial.legendre as geek # Legendre series coefficients s1 = (10, 20, 30, 40, 50) s2 = (2, 4, 6, 8, 10) # using np.legdiv() method res = geek.legdiv(s1, s2) # Resulting Legendre series print (res) Output: (array([ 5.]), array([ 0.])) Comment More infoAdvertise with us Next Article Python | Numpy np.legdiv() method J jana_sayantan Follow Improve Article Tags : Python Python-numpy Python numpy-Mathematical Function Practice Tags : python Similar Reads Python | Numpy np.legadd() method np.legadd() method is used to add one Legendre series to another.It returns the sum of two Legendre series c1 + c2. Syntax : np.legadd(c1, c2) Parameters: c1, c2 :[ array_like ] 1-D arrays of Legendre series coefficients ordered from low to high. Return : [ndarray] Array representing the Legendre se 1 min read Python | Numpy np.legsub() method np.legub() method is used to subtract one Legendre series to another.It returns the difference of two Legendre series c1 - c2. Syntax : np.legub(c1, c2) Parameters: c1, c2 :[ array_like ] 1-D arrays of Legendre series coefficients ordered from low to high. Return : [ndarray] Legendre series coeffici 1 min read Python | Numpy np.legmul() method np.legmul() method is used to multiply one Legendre series to another.It returns the product of two Legendre series c1 * c2. Syntax : np.legmul(c1, c2) Parameters: c1, c2 :[ array_like ] 1-D arrays of Legendre series coefficients ordered from low to high. Return : [ndarray] Legendre series coefficie 1 min read Python | Numpy np.legvander() method np.legvander() method is used to returns the Vandermonde matrix of degree deg and sample points x. Syntax : np.legvander(x, deg) Parameters: x :[ array_like ] Array of points. The dtype is converted to float64 or complex128 depending on whether any of the elements are complex. If x is scalar it is c 1 min read Python | Numpy np.legzero() method np.legzero() method can be used instead of np.zeros for creating a array whose elements are 0. Syntax : np.legzero() Return : Return array([0]) Example #1 : Python3 1=1 # Python program explaining # numpy.legzero() method # import numpy and legzero import numpy as np from numpy.polynomial.legendre i 1 min read Like