Python | Numpy np.hermadd() method

With the help of np.hermadd() method, we can add the one hermite series to another by using np.hermadd() method.

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

Example #1 :
In this example we can see that by using np.hermadd() method, we are able to get the addition of two hermite series by using this method.

filter_none

edit
close

play_arrow

link
brightness_4
code

# import numpy and hermadd
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 np.hermadd() method
gfg = hermadd(series1, series2)
  
print(gfg)

chevron_right


Output :

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



Example #2 :

filter_none

edit
close

play_arrow

link
brightness_4
code

# import numpy and hermadd
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 np.hermadd() method
gfg = hermadd(series1, series2)
  
print(gfg)

chevron_right


Output :

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

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.