Python | Numpy np.legdomain() method Last Updated : 31 Dec, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of np.legdomain() method, we can get the filter having value array([-1, 1]) in legendre series. Syntax : np.legdomain Return : Return filter of array([-1, 1]) Example #1 : Python3 1=1 # Python program explaining # numpy.legdomain() method # import numpy and legdomain import numpy as np from numpy.polynomial.legendre import legdomain # using np.legdomain() method for i in range(5): ans = legdomain + [i, i + 1] print(ans) Output : [-1 2] [0 3] [1 4] [2 5] [3 6] Example #2 : Python3 1=1 # Python program explaining # numpy.legdomain() method # import numpy and legdomain import numpy as np from numpy.polynomial.legendre import legdomain # using np.legdomain() method for i in range(4): ans = legdomain + [i-1, i + 1] print(ans) Output : [-2 2] [-1 3] [0 4] [1 5] Comment More infoAdvertise with us Next Article Python | Numpy np.legdomain() method J jana_sayantan Follow Improve Article Tags : Python Python-numpy Python numpy-Mathematical Function Practice Tags : python Similar Reads Python | Numpy np.legcompanion() method np.legcompanion() method is used to return the companion matrix of legendre series. Syntax : np.legcompanion(c) Parameters: c :[array_like] 1-D arrays of legendre series coefficients ordered from low to high. Return : [ndarray] Companion matrix of dimensions (deg, deg). Code #1 : Python3 # Python pr 1 min read Python | Numpy np.legdiv() method 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 se 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 Python | Numpy np.leg2poly() method np.leg2poly() method is used to convert a legendre series to a polynomial. Syntax : np.leg2poly(c) Parameters: c :[array_like] 1-D arrays of legendre series coefficients ordered from low to high. Return : [ndarray] 1-D array containing the coefficients of the equivalent polynomial. Code #1 : Python3 1 min read Like