Python | Numpy np.chebval3d () method

NumPy | Python Methods and Functions

Using the np.chebval3d() method, we can get an array of coefficients after estimating by (x, y, z) by Chebyshev series using np. chebval3d () .

Syntax: np.chebval3d (x, y, z, c)
Return: Return an array after evaluation on (x, y, z).

Example # 1:
B In this example, we can see that using np.chebval3d () we can get an array of coefficients by evaluating (x, y, z) from Chebyshev series.

# NumPy import

import numpy as np

import numpy.polynomial.chebyshev as cheb

 
# using the np.chebva method l3d ()

gfg = cheb. chebval3d (( 2 , 5 ), ( 1 , 3 ), ( 4 , 8 ), ( 2 , - 4 , 1 ))

 

print (gfg)

Output:

[408. 784.]

Example # 2:

# NumPy import

import numpy as np

import numpy.polynomial.chebyshev as cheb

 
# using the 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]





Get Solution for free from DataCamp guru