Python | The numpy np.hermpow () method

NumPy | Python Methods and Functions

Using the np.hermpow() method, we can get the cardinality of the Hermite series using np.hermpow () .

Syntax: np.hermpow (series, pow)
Return: Return the coefficient of series after applying power.

Example # 1:
In this example, we see that with np.hermpow () we can get the coefficient of the row after including the Hermite row using this method.

# numpy and hermpow imports

import numpy as np

from numpy.polynomial.hermite import hermpow

  

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

 
# using np.hermpow () method

gfg = hermpow (series, 2 )

  

print (gfg)

Output:

[10449. 8308 21970 6228 8003 1004 846 40 25]

Example # 2:

# numpy and hermpow imports

import numpy as np

from numpy.polynomial.hermite import hermpow

 

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

 
# using the np method. hermpow ()

gfg = hermpow (series, 3 )

 

print (gfg )

Output:

[2257. 2358. 3837. 908. 711. 54. 27.]





Get Solution for free from DataCamp guru