Python | Numpy np.chebsub() method
Last Updated :
03 Nov, 2019
With the help of np.chebsub()
method, we can get the subtraction of two Chebyshev series by using np.chebsub()
method.
Syntax : np.chebsub(s1, s2)
Return : Return an array after subtraction.
Example #1 :
In this example we can see that by using np.chebsub()
method, we are able to get the subtraction of two chebyshev series using this method.
import numpy as np
from numpy.polynomial import chebyshev as C
s1 = ( 4 , 6 , 8 )
s2 = ( 3 , 5 , 7 )
gfg = C.chebsub(s1, s2)
print (gfg)
|
Output :
[1., 1., 1.]
Example #2 :
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 )
gfg = C.chebsub(s1, s2)
print (gfg)
|
Output :
[ 1. 1. 1. -1. -1. -1.]
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...