Python | Numpy np.leggrid3d() method (original) (raw)
Last Updated : 29 Dec, 2019
**np.leggrid3d()**
method is used to evaluate a 3-D legendre series on the Cartesian product of x, y and z.
Syntax :
np.leggrid3d(x, y, z, c)
Parameters:
**x, y, z :**[array_like]The three dimensional series is evaluated at the points in the Cartesian product of x, y and z. If x or y or z is a list or tuple, it is first converted to an ndarray, otherwise it is left unchanged and, if it isn’t an ndarray, it is treated as a scalar.
**c :**[array_like] legendre series coefficients.Return : [ndarray] The values of the two dimensional legendre series at points in the Cartesian product of x and y.
Code #1 :
import
numpy as np
from
numpy.polynomial.legendre
import
leggrid3d
c
=
np.array([[
1
,
3
,
5
], [
2
,
4
,
6
], [
10
,
11
,
12
]])
ans
=
leggrid3d([
7
,
9
], [
8
,
10
], [
5
,
6
], c)
print
(ans)
Output:
[[ 878011. 1034500.5] [ 1351191. 1592014.5]]
Code #2 :
import
numpy as np
from
numpy.polynomial.legendre
import
leggrid3d
c
=
np.array([[
1
,
3
,
5
], [
2
,
4
,
6
], [
10
,
11
,
12
]])
ans
=
leggrid3d(
7
,
11
,
12
, c)
print
(ans)
Similar Reads
- Python | Numpy np.leggrid2d() method np.leggrid2d() method is used to evaluate a 2-D legendre series on the Cartesian product of x and y. Syntax : np.leggrid2d(x, y, c) Parameters: x, y :[array_like]The two dimensional series is evaluated at the points in the Cartesian product of x and y. If x or y is a list or tuple, it is first conve 2 min read
- Python | Numpy np.laggrid3d() method np.laggrid3d() method is used to evaluate a 3-D Laguerre series on the Cartesian product of x, y and z. Syntax : np.laggrid3d(x, y, z, c) Parameters: x, y, z :[array_like]The three dimensional series is evaluated at the points in the Cartesian product of x, y and z. If x or y or z is a list or tuple 2 min read
- Python | Numpy np.chebgrid3d() method With the help of np.chebgrid3d() method, we can get the array of coefficients after evaluation the chebyshev series on cartesian product of x, y and z by using np.chebgrid3d() method. Syntax : np.chebgrid3d(x, y, z, c) Return : Return an array after evaluation on (x, y, z). Example #1 : In this exam 1 min read
- Python | Numpy np.hermegrid3d() method With the help of np.hermegrid3d() method, we can evaluate a 3-D hermite series on cartesian product of (x, y, z), where (x, y, z) is defined in the np.hermegrid3d() method. Syntax : np.hermegrid3d(x, y, z, series) Return : Return the evaluated 3-D hermite series. Example #1 : In this example we can 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.legvander3d() method np.legvander3d() method is used to returns the Vandermonde matrix of degree deg and sample points x, y and z. Syntax : np.legvander3d(x, y, z, deg) Parameters: x, y, z :[ array_like ] Array of points. The dtype is converted to float64 or complex128 depending on whether any of the elements are comple 2 min read
- Python | Numpy np.lagval3d() method With the help of np.lagval3d() method, we can get the 3-D laguerre series at point x by using np.lagval3d() method. Syntax : np.lagval3d(x, y, z, c) Return : Return the 3-D laguerre series at point x, y and z. Example #1 : In this example we can see that by using np.lagval3d() method, we are able to 1 min read
- Python | Numpy np.leggauss() method np.leggauss() Computes the sample points and weights for Gauss-legendre quadrature. These sample points and weights will correctly integrate polynomials of degree 2*deg - 1 or less over the interval [-1, 1] with the weight function f(x) = 1 Syntax : np.leggauss(deg) Parameters: deg :[int] Number of 1 min read
- Python | Numpy np.lagvander3d() method np.lagvander3d() method is used to returns the Vandermonde matrix of degree deg and sample points x, y and z. Syntax : np.lagvander3d(x, y, z, deg) Parameters: x, y, z :[ array_like ] Array of points. The dtype is converted to float64 or complex128 depending on whether any of the elements are comple 2 min read
- Python | Numpy np.legvander2d() method With the help of np.legvander2d() method, we can get the Pseudo-Vandermonde matrix from given array having degree which is passed as parameter by using np.legvander2d() method. Syntax : np.legvander2d(x, y, deg) Parameters: x, y :[ array_like ] Array of points. The dtype is converted to float64 or c 2 min read