Python | The numpy np.hermsub () method

With the np.hermsub() method we can subtract one row of hermites into another using np.hermsub () .

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

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

# numpy and hermsub imports

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 the np.hermsub () method

gfg = hermsub (series1, series2)

  

print (gfg)

Output:

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

Example # 2:

# numpy and hermsub imports

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 the np.hermsub () method

gfg = hermsub (series1, series2)

 

print (gfg)

Output:

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