Evaluate a 3-D polynomial at points (x, y, z) with 4D array of coefficient using NumPy in Python Last Updated : 10 Jan, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we will look at how to evaluate a 3-dimensional polynomial at points (x, y, z) with a 4D array of coefficients using NumPy in Python. polynomial.polyval3d method We are using polynomial.polyval3d() function present in the NumPy module of python for the evaluation purpose of a 3-dimensional polynomial at points x, y, and z.Here at points x, y, and z, the 3-dimensional series is being evaluated if x, y, and z have a similar shape, if either from x, y, and z is a list or a tuple then before evaluation it is going to be converted to an nd-array else it is kept as it is. Also if it is not an nd-array, it will be treated as a scalar. Another parameter 'C' is present which is an ordered array of coefficients with multi-degree terms i, j, k present in C[i, j, k]. Syntax : polyval3d(x, y, z, C) Parameters: x, y, z : The three-dimensional series is analyzed at the array-like points.C : It is an sorted array of coefficients organised so that the coefficient of the term of multi-degree i,j,k is contained in c[i,j,k]. Returns: the multidimensional polynomial values on the points formed with the triples of the corresponding values from x, y and z. Example 1 : Python3 # importing numpy module and polyval3d function import numpy as np from numpy.polynomial.polynomial import polyval3d # creating an 4d array of coefficients 'C' # using numpy C = np.arange(24).reshape(2,2,3,2) # Now using polyval3d function we are # evaluating the 3D polynomial at points # (x,y,z) print(polyval3d([2,1],[1,2],[2,3], C)) Output : [[ 582. 1032.] [ 624. 1110.]]Example 2 : Python3 # importing numpy module and polyval3d function import numpy as np from numpy.polynomial.polynomial import polyval3d # creating an 4d array of coefficients 'C' C = np.arange(72).reshape(3,2,6,2) # Now using polyval3d function evaluate # the 3D polynomial at points (x,y,z) x = [4,1] y = [1,2] z = [2,3] print("The result of evaluation by polyval3d function is : \n", polyval3d(x, y, z, C)) Output : The result of evaluation by polyval3d function is : [[146412. 134370.] [149058. 137646.]] Comment More infoAdvertise with us Next Article Evaluate a 3-D polynomial at points (x, y, z) with 4D array of coefficient using NumPy in Python S siddheshsagar Follow Improve Article Tags : Python Python-numpy Python numpy-polynomials Practice Tags : python Similar Reads Evaluate a 3D Laguerre series at points (x,y,z) with 4D array of coefficient using NumPy in Python In this article, we will evaluate a 3D Laguerre Series at points (x,y) with 4 dimensional array of coefficient in Python. laguerre.lagval3d() The laguerre.lagval3d() is used to evaluate a 3D Laguerre series at points (x,y)  which returns the values of the multidimensional polynomial on points formed 2 min read Evaluate a 2-D Hermite series at points (x,y) with 3D array of coefficient using NumPy in Python In this article, we'll look at how to evaluate a 2-dimensional Hermite series using NumPy in Python at an array of points x, and y with the 3-dimensional array. np.hermval2d method We are using the hermite.hermval2d() function from the Numpy module to evaluate a 2D Hermite series at locations (x, y) 2 min read Evaluate a 2-D Hermite_e series at points (x,y) with 3D array of coefficient using NumPy in Python In this article, we will cover how to evaluate a 2-D Hermite_e series at points (x,y) with a 3D array of coefficients using NumPy in Python. np.polynomial.hermite_e.hermeval2d method The np.polynomial.hermite_e.hermeval2d from the NumPy library is used to Evaluate a 2-D Hermite_e series at points(x, 3 min read Evaluate a 2D Laguerre series at points (x,y) with 1D array of coefficient using NumPy in Python In this article, we will Evaluate a 2D Laguerre series at points (x,y) with a 1D array of coefficient Laguerre.lagval2d method In Python, laguerre.lagval2d() is used to evaluate a 2D Laguerre series at points (x,y). where coefficient_array is the input NumPy 1D array with coefficients and points re 2 min read Evaluate a Polynomial at Points x Broadcast Over the Columns of the Coefficient in Python using NumPy In this article, we are going to see how to evaluate a polynomial at points x broadcast over the columns of the coefficient in Python using NumPy. numpy.polyval() methods The numpy numpy.polynomial.polynomial.polyval() method is used to evaluate a polynomial at points x broadcast over the columns o 4 min read Like