[Python] ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with...

Discussão em 'Python' iniciado por Stack, Março 5, 2025.

  1. Stack

    Stack Membro Participativo

    I have written code using matmul, but I am getting the following error:

    "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)"


    Code:

    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)

    Continue reading...

Compartilhe esta Página