Thursday, January 22, 2026
HomeLanguagesPython | Numpy np.hermsub() method

Python | Numpy np.hermsub() method

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

Syntax : np.hermsub(series1, series2)
Return : Return the coefficients after subtraction of series.

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




# import numpy and hermsub
import numpy as np
from numpy.polynomial.hermite import hermsub
  
series1 = np.array([1, 2, 3, 4, 5])
series2 = np.array([6, 7, 8, 9, 10])
  
# using np.hermsub() method
gfg = hermsub(series1, series2)
  
print(gfg)


Output :

[-5. -5. -5. -5. -5.]

Example #2 :




# import numpy and hermsub
import numpy as np
from numpy.polynomial.hermite import hermsub
  
series1 = np.array([1, 0, 3, 0, 5])
series2 = np.array([0, 7, 0, 9, 0])
  
# using np.hermsub() method
gfg = hermsub(series1, series2)
  
print(gfg)


Output :

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

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32475 POSTS0 COMMENTS
Milvus
119 POSTS0 COMMENTS
Nango Kala
6847 POSTS0 COMMENTS
Nicole Veronica
11977 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12064 POSTS0 COMMENTS
Shaida Kate Naidoo
6986 POSTS0 COMMENTS
Ted Musemwa
7220 POSTS0 COMMENTS
Thapelo Manthata
6933 POSTS0 COMMENTS
Umr Jansen
6912 POSTS0 COMMENTS