Friday, October 3, 2025
HomeLanguagesPython | Numpy np.chebroots() method

Python | Numpy np.chebroots() method

With the help of np.chebroots() method, we can get the roots of chebyshev series by using np.chebroots() method.

Syntax : np.chebroots(array of coefficients)
Return : Return the array having roots of chebyshev series.

Example #1 :
In this example we can see that by using np.chebroots() method, we are able to get the roots of chebyshev series by using this method.




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


Output :

[-3.83265557 -0.71484143 0.54749701]

Example #2 :




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


Output :

[-1.02213642 -0.38135467 0.40624906 0.94724203]

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

Most Popular

Dominic
32331 POSTS0 COMMENTS
Milvus
85 POSTS0 COMMENTS
Nango Kala
6703 POSTS0 COMMENTS
Nicole Veronica
11867 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11929 POSTS0 COMMENTS
Shaida Kate Naidoo
6818 POSTS0 COMMENTS
Ted Musemwa
7080 POSTS0 COMMENTS
Thapelo Manthata
6775 POSTS0 COMMENTS
Umr Jansen
6776 POSTS0 COMMENTS