Evaluate a Hermite_e series at tuple of points x 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 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() 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 tuple named x, then with the use of the hermite_e.hermeval() method to pass the required parameters to evaluate the Hermite_e series at points (6,7,8,9,10).
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)
# Tuple
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 tuple 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 tuple at points (11,12,13,14,15).
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)
# Tuple
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 tuple of points x in Python In this article, we will be looking toward the approach to evaluating a Hermite series at a tuple of points x in Python and NumPy. Example Tuple: (6,7,8,9,10) Result: [102175. 191631. 329175. 529399. 808815.] Explanation: Hermite series at points x. Â NumPy.polynomial.hermite.hermval() method To eval
2 min read
Evaluate Hermite_e series at array of points x in Python In this article, we will be looking at the approach to evaluate a Hermite_e series at an array of points x in Python. We are using the hermite.hermeval() function in Python Numpy to evaluate a Hermite e series at point x. The first parameter, x, is transformed to an array if it is a list or tuple; o
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 Hermite_e series at list of points x using NumPy in Python 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
3 min read
Evaluate a Hermite_e series at list of points x using NumPy in Python In this article, we will cover how to evaluate a Hermite_e series at the list of points x using NumPy in Python. numpy.polynomial.hermite.hermval To evaluate a Hermite series at points x with a multidimensional coefficient array, NumPy provides a function called hermite.hermval(). It takes two param
3 min read