Python | Numpy np.chebsub() method (original) (raw)
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.]
Similar Reads
- Python | Numpy np.chebmul() method With the help of np.chebmul() method, we can get the multiplication of two Chebyshev series by using np.chebmul() method. Syntax : np.chebmul(s1, s2) Return : Return an array after multiplication. Example #1 : In this example we can see that by using np.chebmul() method, we are able to get the multi 1 min read
- Python | Numpy np.chebmulx() method With the help of np.chebmulx() method, we can get the multiplication of Chebyshev series with independent variable x by using np.chebmulx() method. Syntax : np.chebmulx(s1) Return : Return an array after multiplication with x. Example #1 : In this example we can see that by using np.chebmulx() metho 1 min read
- Python | Numpy np.legsub() method np.legub() method is used to subtract one Legendre series to another.It returns the difference of two Legendre series c1 - c2. Syntax : np.legub(c1, c2) Parameters: c1, c2 :[ array_like ] 1-D arrays of Legendre series coefficients ordered from low to high. Return : [ndarray] Legendre series coeffici 1 min read
- Python | Numpy np.chebfit() method With the help of np.chebfit() method, we can get the least square fit of chebyshev series by using np.chebfit() method. Syntax : np.chebfit(x, y, degree) Return : Return the array of chebyshev series coefficient values. Example #1 : In this example we can see that using np.chebfit() method, we are a 1 min read
- 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 a 1 min read
- Python | Numpy np.chebdiv() method With the help of np.chebdiv() method, we can get the division of two Chebyshev series by using np.chebdiv() method. Syntax : np.chebdiv(s1, s2) Return : Return an array after division. Example #1 : In this example we can see that by using np.chebdiv() method, we are able to get the division of two c 1 min read
- Python | Numpy np.chebpow() method With the help of np.chebpow() method, we can get the power of Chebyshev series by using np.chebpow() method. Syntax : np.chebpow(s1, power) Return : Return an array after power the series. Example #1 : In this example we can see that by using np.chebpow() method, we are able to get the power of cheb 1 min read
- Python | Numpy np.chebadd() method With the help of np.chebadd() method, we can get the addition of two Chebyshev series by using np.chebadd() method. Syntax : np.chebadd(s1, s2) Return : Return an array after addition. Example #1 : In this example we can see that by using np.chebadd() method, we are able to get the addition of two c 1 min read
- Python | Numpy np.chebder() method With the help of np.chebder() method, we can get the differentiated value of chebyshev series in the form of an array having value of coordinates using np.chebder() method. Syntax : np.chebder(series, value) Return : Return an array having coordinates of series after differentiation. Example #1 : In 1 min read
- Python | Numpy np.chebint() method With the help of np.chebint() method, we can get the integration value of chebyshev series in the form of an array having value of coordinates using np.chebint() method. Syntax : np.chebint(series, value) Return : Return an array having coordinates of series after integration. Example #1 : In this e 1 min read