# Python | Numpy np.chebgrid2d() method

With the help of `np.chebgrid2d()` method, we can get the array of coefficients after evaluation the chebyshev series on cartesian product of x and y by using `np.chebgrid2d()` method.

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

Example #1 :
In this example we can see that by using `np.chebgrid2d()` method, we are able to get the array of coefficients by evaluating the chebyshev series on the cartesian product of x and y.

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

Output :

[32. 94.]

Example #2 :

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

Output :

[719680. 6486180. 52831708.]

My Personal Notes arrow_drop_up Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.