Friday, September 26, 2025
HomeLanguagesPython | Numpy np.chebval2d() method

Python | Numpy np.chebval2d() method

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

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

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




# import numpy
import numpy as np
import numpy.polynomial.chebyshev as cheb
  
# using np.chebval2d() method
gfg = cheb.chebval2d((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.chebval2d() method
gfg = cheb.chebval2d((1, 3, 5, 7), (2, 4, 8), (2, -4, 1, 5, 1))
  
print(gfg)


Output :

[719680. 6486180. 52831708.]

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32320 POSTS0 COMMENTS
Milvus
84 POSTS0 COMMENTS
Nango Kala
6683 POSTS0 COMMENTS
Nicole Veronica
11854 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11910 POSTS0 COMMENTS
Shaida Kate Naidoo
6795 POSTS0 COMMENTS
Ted Musemwa
7071 POSTS0 COMMENTS
Thapelo Manthata
6755 POSTS0 COMMENTS
Umr Jansen
6762 POSTS0 COMMENTS