小编BiS*_*raz的帖子

ValueError: matmul: 输入操作数 1 在其核心维度 0 中存在不匹配,具有 gufunc 签名 (n?,k),(k,m?)->(n?,m?)(大小 1 与 3 不同)

我已经使用 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)"
Run Code Online (Sandbox Code Playgroud)

代码:

    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)
Run Code Online (Sandbox Code Playgroud)

python numpy python-3.x

10
推荐指数
1
解决办法
6万
查看次数

标签 统计

numpy ×1

python ×1

python-3.x ×1