Python Numpy np.ma.innerproduct()方法
在np.ma.innerproduct()方法的帮助下,我们可以通过np.ma.innerproduct()方法计算两个列表的向量乘积。
语法: np.ma.innerproduct()
返回:返回两个列表的矢量乘积。
例子#1 :
在这个例子中我们可以看到,通过使用np.ma.innerproduct()方法,我们能够得到两个向量的内积值。
输出 :
30
例子#2 :
输出 :
[ 30 120]
在np.ma.innerproduct()方法的帮助下,我们可以通过np.ma.innerproduct()方法计算两个列表的向量乘积。
语法: np.ma.innerproduct()
返回:返回两个列表的矢量乘积。
例子#1 :
在这个例子中我们可以看到,通过使用np.ma.innerproduct()方法,我们能够得到两个向量的内积值。
输出 :
30
例子#2 :
输出 :
[ 30 120]