Skip to main content

TypeError: unsupported operand type(s) for @: 'MVar' and 'numpy.float64'

Awaiting user input

Comments

2 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Simon Bowly
    • Gurobi Staff

    Hi Victor,

    Could you please post a minimal, reproducible example? This must include how all variables and data in your code are created so that we can reproduce the error and point to the issue.

    An educated guess based on the error message: one of the terms on the "objective =" line is a scalar (a numpy.float64 type) not an array, which is required for the matrix multiplication operator "@". However, I cannot tell which term is causing the error without knowing what each object is in your python code.

    0

Post is closed for comments.