Python | Numpy np.hermadd () method

With the method np.hermadd() we can add one row of hermites to another using np.hermadd () .

Syntax: np.hermadd (series1, series2)
Return: Return the coefficients after addition of series.

Example # 1:
In this example, we see that with np.hermadd () we can get the addition of two rows of Hermite with this method.

# numy and hermadd imports

import numpy as np

from numpy.polynomial.hermite import hermadd

  

series1 = np.array ([ 1 , 2 , 3 , 4 , 5 ])

series2 = np.array ([ 6 , 7 , 8 , 9 , 10 ])

 
# using the np.hermadd () method

gfg = hermadd (series1, series2)

  

print (gfg)

Output:

[7. 9. 11. 13. 15.]

Example # 2:

# numy and hermadd imports

import numpy as np

from numpy.polynomial.hermite import hermadd

 

series1 = np.array ([ 1 , 0 , 3 , 0 , 5 ])

series2 = np.array ([ 0 , 7 , 0 , 9 , 0 ])

 
# using the np.hermadd () method

gfg = hermadd (series1, series2)

 

print (gfg)

Output:

[1. 7. 3. 9. 5.]