Skip to main content

ValueError: Mismatching inner dimensions

Answered

Comments

2 comments

  • Marika Karbstein
    • Gurobi Staff Gurobi Staff

    When you do matrix multiplication, the dimensions need to match. You need to use MVar.transpose().
    Respecting the dimension of matrix I, the line should be

    m.addConstr(A.transpose() @ A == I)
    0
  • Honglin An
    • First Comment
    • First Question

    I see, thank you for the help! 

    0

Please sign in to leave a comment.