Evaluate a Hermite_e series at list of points x using NumPy in Python
Last Updated :
03 Jun, 2022
In this article, we will be looking toward the approach to evaluating a Hermite_e series at a list of points x using Python and NumPy.
Example:
List: [6,7,8,9,10]
Result: [102175. 191631. 329175. 529399. 808815.]
Explanation: Hermite_e series at points x.
NumPy.polynomial.hermite_e.hermeval() method
To evaluate a Hermite_e series at a tuple of points x we need to call the hermite_e.hermeval() method of the Numpy library in Python. this method takes two parameters, the first parameter is the x, where x is a list or tuple, and the 2nd parameter is C, which is an array of coefficients. This method returns the coefficient of series after multiplication.
Syntax : np.polynomial.hermite_e.hermeval(x, c)
Parameter:
- x: list or tuple
- c: array of coefficient
Return : Return the coefficient of series after multiplication.
Example 1:
In this example, we created an array of 5 data points of one dimension and further created a list named x, then with the use of the hermite_e.hermeval() method, and pass the required parameters to evaluate the Hermite_e series at a list at points [6,7,8,9,10] in Python.
Python3
import numpy as np
from numpy.polynomial import hermite_e
a = np.array([1, 2, 3, 4, 5])
# Dimensions of Array
print("Dimensions of Array: ", a.ndim)
# Shape of the array
print("\nShape of Array: ", a.shape)
# List
x = [6, 7, 8, 9, 10]
# To evaluate a Hermite_e series at points x
print("\nHermite series at point", hermite_e.hermeval(x, a))
Output:
Dimensions of Array: 1
Shape of Array: (5,)
Hermite series at point [ 6325. 11997. 20733. 33457. 51213.]
Example 2:
In this example, we created a 2-D array of 10 data points and further created a list name x, then with the use of the hermite_e.hermeval() method, and pass the required parameters to evaluate the Hermite_e series at a list at points (11,12,13,14,15) in Python.
Python3
import numpy as np
from numpy.polynomial import hermite_e
a = np.array([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
# Dimensions of Array
print("Dimensions of Array: ", a.ndim)
# Shape of the array
print("\nShape of Array: ", a.shape)
# list
x = [11, 12, 13, 14, 15]
# To evaluate a Hermite_e series at points x
print("\nHermite series at point", hermite_e.hermeval(x, a))
Output:
Dimensions of Array: 2
Shape of Array: (2, 5)
Hermite series at point [[ 67. 73. 79. 85. 91.]
[ 79. 86. 93. 100. 107.]
[ 91. 99. 107. 115. 123.]
[103. 112. 121. 130. 139.]
[115. 125. 135. 145. 155.]]
Similar Reads
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
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 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 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 Hermite_e series at tuple of points x in Python In this article, we will be looking toward the approach to evaluating a Hermite_e series at a tuple of points x using Python and NumPy. Example: Tuple: (6,7,8,9,10) Result: [102175. 191631. 329175. 529399. 808815.] Explanation: Hermite_e series at points x.NumPy.polynomial.hermite_e.hermeval() metho
2 min read