 # Python | Numpy np.chebgrid3d () method

Using the method `np.chebgrid3d() ` we can get an array of coefficients after calculating the Chebyshev series from the Cartesian product of x, y and z using ` np.chebgrid3d () `.

Syntax: ` np.chebgrid3d (x, y, z, c) `
Return: Return an array after evaluation on (x, y, z).

Example # 1:
This In the example, we can see that using ` np.chebgrid3d () `, we can get an array of coefficients by evaluating Chebyshev series on the Cartesian product of x, y and z.

 ` # NumPy import ` ` import ` ` numpy as np ` ` import ` ` numpy.polynomial.chebyshev as cheb `   ` # using the np.chebgrid3d () method ` ` gfg ` ` = ` ` cheb.chebgrid3d ((` ` 2 ` `, ` ` 5 ` `), (` ` 1 ` `, ` ` 3 ` `), (` ` 5 ` `, ` ` 6 ` `, ` ` - ` ` 3 ` `), (` ` 2 ` `, ` ` - ` ` 4 ` `, ` ` 1 )) ````   print (gfg) ```

Exit od:

[502. 596. -250.]

Example # 2:

` `

``` # NumPy import import numpy as np import numpy.polynomial.chebyshev as cheb    # using the np.chebgrid3d () method gfg = cheb.chebgrid3d (( 1 , - 3 , 7 ), ( - 2 , 4 ,  - 8 ), ( 3 , - 4 , 1 ), ( 2 , - 4 , 1 , 5 , 1 ))   print (gfg) ```

` `

Output:

[57913404. 97926342. 4230432.]