Python | Numpy np.chebadd () method

Using the np.chebadd() method, we can get the addition of two Chebyshev rows using np.chebadd () .

Syntax: np.chebadd (s1, s2)
Return: Return an array after addition.

Example # 1:
In this example, we can see that using np.chebadd () , we can get the addition of two Chebyshev rows using this method.

# NumPy import

import numpy as np

from numpy.polynomial import chebyshev as C

 

s1 = ( 4 , 6 , 8 )

s2 = ( 3 , 5 , 7 )

# using the np.chebadd () method

gfg = C.chebadd (s1, s2)

 

print (gfg)

Output:

[7. 11. 15.]

Example # 2:

# NumPy import

import numpy as np

from numpy.polynomial import chebyshev as C

 

s1 = ( 4 , 6 , 8 , 1 , 3 , 5 )

s2 = ( 3 , 5 , 7 , 2 , 4 , 6 )

# using the np.chebadd () method

gfg = C.chebadd (s1, s2)

 

print (gfg)

Output:

[7. 11. 15. 3. 7. 11.]