Multiply one Hermite series to another in Python using NumPy
The NumPy polynomial.hermite.hermmul() is used to Multiply one Hermite series by another series. The product of two Hermite series c1 * c2 is returned. The arguments are sequences of coefficients, starting with the lowest order “term” and ending with the highest order “term.” for example, [2,3,4] represents the series 2*P_0 + 3*P_1 + 4*P_2.
Syntax: polynomial.hermite.hermmul(c1, c2)
- c1,c2: array like objects. Hermite series coefficients are arranged from low to high in a 1-D array.
Return: out: ndarray. The product of the coefficients of the Hermite series.
In this example, we created two arrays of numbers that represent coefficients using the np.array() method. The shape of the array is defined by the .shape attribute and the dimension of the array is defined by .ndim, the datatype of the array is returned by .dtype attribute. The hermite.hermul() method is used to multiple two Hermite series and the result is returned.
[2 3 4]
[5 6 7]
Shape of the array1 is : (3,)
Shape of the array2 is : (3,)
The dimension of the array1 is : 1
The dimension of the array2 is : 1
Datatype of our Array is : int64
Datatype of our Array2 is : int64
Multiplication of two hermite series : [270. 207. 276. 45. 28.]