Evaluate 3-D Hermite series on the Cartesian product of x, y and z using NumPy in Python
Last Updated :
23 Jul, 2025
In this article, we will discuss how to Evaluate a 3-D Hermite series on the Cartesian product of x, y, and z in Python and NumPy.
NumPy.polynomial.hermite.hermgrid3d method
Hermite polynomials are significant in approximation theory because the Hermite nodes are used as matching points for optimizing polynomial interpolation. To perform Hermite differentiation, NumPy provides a function called hermite.hermgrid3d which can be used to evaluate the cartesian product of the 3D Hermite series. This function converts the parameters x, y, and z to array only if they are tuples or a list, otherwise, it is left unchanged and, if it is not an array, it is treated as a scalar.
Syntax: polynomial.hermite.hermgrid3d(x, y, z, c)
Parameters:
- x,y,z: array_like
- c: array of coefficients
Returns: Two dimensional polynomials at points as cartesian products of x and y.
Example 1:
In the first example. let us consider a 4D array c of size 32. Let us consider a 3D series [1,2],[1,2],[1,2] to evaluate against the 4D array. Import the necessary packages as shown and pass the appropriate parameters as shown below.
Python3
import numpy as np
from numpy.polynomial import hermite
# co.efficient array
c = np.arange(32).reshape(2, 2, 4, 2)
print(f'The co.efficient array is {c}')
print(f'The shape of the array is {c.shape}')
print(f'The dimension of the array is {c.ndim}D')
print(f'The datatype of the array is {c.dtype}')
# evaluating 4d co.eff array with a 3d hermite series
res = hermite.hermgrid3d([1, 2], [1, 2], [1, 2], c)
# resultant array
print(f'Resultant series ---> {res}')
Output:
The co.efficient array is [[[[ 0 1]
[ 2 3]
[ 4 5]
[ 6 7]]
[[ 8 9]
[10 11]
[12 13]
[14 15]]]
[[[16 17]
[18 19]
[20 21]
[22 23]]
[[24 25]
[26 27]
[28 29]
[30 31]]]]
The shape of the array is (2, 2, 4, 2)
The dimension of the array is 4D
The datatype of the array is int64
Resultant series ---> [[[[3.6000e+01 1.1232e+04]
[7.6000e+01 1.9664e+04]]
[[9.2000e+01 2.0608e+04]
[1.8000e+02 3.5920e+04]]]
[[[4.5000e+01 1.1763e+04]
[9.1000e+01 2.0549e+04]]
[[1.0700e+02 2.1493e+04]
[2.0500e+02 3.7395e+04]]]]
Example 2:
In this example, we are using a 1-D array to evaluate a 3-D Hermite series on the Cartesian product series.
Python3
# import packages
import numpy as np
from numpy.polynomial import hermite
# array of coefficients
c = np.array([2,2,3])
print(c)
# shape of the array is
print("Shape of the array is : ",c.shape)
# dimension of the array
print("The dimension of the array is : ",c.ndim)
# Datatype of the array
print("Datatype of our Array is : ",c.dtype)
#evaluating hermite series
print(hermite.hermgrid3d([1,2],[3,4],[5,6],c))
Output:
[2 2 3]
Shape of the array is : (3,)
The dimension of the array is : 1
Datatype of our Array is : int64
[4604. 5460.]
Similar Reads
Evaluate 2-D Hermite series on the Cartesian product of x and y with 3d array of coefficient using NumPy in Python In this article, we will discuss how to Evaluate a 2-D Hermite series on the Cartesian product of x and y with a 3d array of coefficients in Python and NumPy. NumPy.polynomial.hermite.hermgrid2d method Hermite polynomials are significant in approximation theory because the Hermite nodes are used as
3 min read
Evaluate 2-D Hermite series on the Cartesian product of x and y with 1d array of coefficient using NumPy in Python In this article, we will discuss how to Evaluate a 2-D Hermite series on the Cartesian product of x and y with a 1d array of coefficients in Python using NumPy. NumPy.polynomial.hermite.hermgrid2d method Hermite polynomials are significant in approximation theory because the Hermite nodes are used a
3 min read
Evaluate a 2-D Hermite series at points (x,y) in using NumPy Python In this article, we will Evaluate a 2D Hermite series at points (x,y) in Numpy using python. hermite.hermval2d method In Python, To evaluate a Hermite series at points x with a multidimensional coefficient array, NumPy provides a function called hermite.hermval(), But to evaluate  2D Hermite series,
3 min read
Evaluate a 2-D Hermite_e series at points (x,y) using NumPy in Python In this article, we will cover how to evaluate a 2-D Hermite_e series at points (x,y) in Python. polynomial.hermite.hermval2d The numpy.polynomial.hermite.hermval2d() from the NumPy library is used to Evaluate a 2-D Hermite_e series at points(x,y) in Python. If the parameters x and y are tuples or l
3 min read
Evaluate a Hermite_e series at points x in using NumPy Python In this article, we will cover how to evaluate a Hermite_e series at points x using NumPy in Python. numpy.polynomial.hermite.hermval The numpy.polynomial.hermite.hermval() method from the NumPy library is used to evaluate a Hermite series at points x. If the parameter x is a tuple or a list, it is
2 min read
Evaluate a Hermite series at list of points x using NumPy in Python In this article, we will be looking toward the approach to evaluating a Hermite series at a list of points x in Python and NumPy. Example: List: [6,7,8,9,10] Result: [102175. 191631. 329175. 529399. 808815.] Explanation: Hermite series at points x.NumPy.polynomial.hermite.hermval() method To evaluat
2 min read