TypeError: unsupported operand type(s) for @: 'MVar' and 'numpy.float64'
Awaiting user inputI got the following error, and it seems something is incompatible with '@' as the operand. Can someone help?
TypeError: unsupported operand type(s) for @: 'MVar' and 'numpy.float64'

0
-
Official comment
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. -
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.
Comments
2 comments