With the help of np.chebval3d()
method, we can get the array of coefficients after evaluation on (x, y, z) on chebyshev series by using np.chebval3d()
method.
Syntax :
np.chebval3d(x, y, z, c)
Return : Return an array after evaluation on (x, y, z).
Example #1 :
In this example we can see that by using np.chebval3d()
method, we are able to get the array of coefficients by evaluating (x, y, z) on chebyshev series.
# import numpy import numpy as np
import numpy.polynomial.chebyshev as cheb
# using np.chebval3d() method gfg = cheb.chebval3d(( 2 , 5 ), ( 1 , 3 ), ( 4 , 8 ), ( 2 , - 4 , 1 ))
print (gfg)
|
Output :
[408. 784.]
Example #2 :
# import numpy import numpy as np
import numpy.polynomial.chebyshev as cheb
# using np.chebval3d() method gfg = cheb.chebval3d(( 1 , 3 , 5 , 7 ), ( 2 , 4 , 8 ), ( - 10 , - 12 ), ( 2 , - 4 , 1 , 5 , 1 ))
print (gfg)
|
Output :
[1.04493678e+10 1.50855857e+10]
Article Tags :