Python | Numpy np.hermdiv () method

NumPy | Python Methods and Functions

Using the np.hermdiv() method, we can get the division of two Hermite rows using np.hermdiv () .

Syntax: np.hermdiv (series1, series2)
Return: Return the coefficient of series after division.

Example # 1:
In this example, we see that with np.hermdiv () we we can get the coefficient of a row after dividing two Hermite rows using this method.

# numpy and hermdiv imports

import numpy as np

from numpy.polynomial.hermite import hermdiv

 

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

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

 
# using the np.hermdiv () method

gfg = hermdiv (series1, series 2)

 

print (gfg)

Exit:

(array ([0.5]), array ([- 2., -1.5, -1., -0.5]))

Example # 2:

# numpy and hermdiv imports

import numpy as np

from numpy.polynomial.hermite import hermdiv

  

series1 = np .array ([ 1 , 2 , < code class = "value"> 3 ])

series2 = np.array ([ 1 , 2 , 3 ] )

 
# using the np.hermdiv () method

gfg = hermdiv (series1, series2)

 

print (gfg )

Output:

(array ([1.]), array ([0.]))





Get Solution for free from DataCamp guru