Tuesday, June 9, 2026
HomeLanguagesPython | Numpy np.chebval() method

Python | Numpy np.chebval() method

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

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

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




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


Output :

[ 1. 31.]

Example #2 :




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


Output :

[5.0000e+00 1.0790e+03 7.2570e+03 2.5643e+04]

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

Most Popular

Dominic
32515 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6895 POSTS0 COMMENTS
Nicole Veronica
12012 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12109 POSTS0 COMMENTS
Shaida Kate Naidoo
7018 POSTS0 COMMENTS
Ted Musemwa
7262 POSTS0 COMMENTS
Thapelo Manthata
6976 POSTS0 COMMENTS
Umr Jansen
6963 POSTS0 COMMENTS