【发布时间】:2019-12-13 06:29:33
【问题描述】:
我使用 matmul 编写过代码,但出现以下错误:
"ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 1 is different from 3)"
代码:
R = [[0.40348195], [0.38658295], [0.82931052]]
V = [0.33452744, 0.33823673, 0.32723583]
print("Rt_p: ", R)
B = np.matmul(V,np.transpose(R))/pow(LA.norm(R), 2)
print("B", B)
【问题讨论】:
标签: python python-3.x numpy