Saturday, June 13, 2026
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
32515 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6897 POSTS0 COMMENTS
Nicole Veronica
12013 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12109 POSTS0 COMMENTS
Shaida Kate Naidoo
7019 POSTS0 COMMENTS
Ted Musemwa
7262 POSTS0 COMMENTS
Thapelo Manthata
6976 POSTS0 COMMENTS
Umr Jansen
6964 POSTS0 COMMENTS