Python Numpy np.hermmul()方法

Python Numpy np.hermmul()方法

在np.hermmul()方法的帮助下,我们可以通过np.hermmul()方法得到两个赫米特数列的乘法。

语法: np.hermmul(series1, series2)
返回:返回乘法后的系列系数。

例子#1 :
在这个例子中,我们可以看到,通过使用np.hermmul()方法,我们能够得到两个赫米特级数相乘后的系数。

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

输出 :

[21154. 17903. 44860. 13458. 16278. 2154. 1706. 85. 50.]

例子#2 :

# import numpy and hermmul
import numpy as np
from numpy.polynomial.hermite import hermmul
  
series1 = np.array([1, 2, 3])
series2 = np.array([1, 2, 3])
  
# using np.hermmul() method
gfg = hermmul(series1, series2)
  
print(gfg)

输出 :

[81. 52. 82. 12. 9.]

Python教程

Java教程

Web教程

数据库教程

图形图像教程

大数据教程

开发工具教程

计算机教程