python代码
x = np.array([[1,3],[1,4]]) y = np.array([[2,2],[3,1]]) print np.dot(x,y)
结果
[[11 5] [14 6]]
结算过程, 行 * 列
1 3 2 2 1*2 + 3 * 3 1 * 2 + 3 * 1 11 5
1 4 3 1 1*2 + 4 * 3 1 * 2 + 4 * 1 14 6
chengxin1982 2017-10-03 09:59 原文
python代码
x = np.array([[1,3],[1,4]]) y = np.array([[2,2],[3,1]]) print np.dot(x,y)
结果
[[11 5] [14 6]]
结算过程, 行 * 列
1 3 2 2 1*2 + 3 * 3 1 * 2 + 3 * 1 11 5
1 4 3 1 1*2 + 4 * 3 1 * 2 + 4 * 1 14 6