-
Notifications
You must be signed in to change notification settings - Fork 273
Open
Description
Describe the bug
A clear and concise description of what the bug is.
MatrixVariable.sum(axis=...) should return MatrixExpr, but return MatrixVariable
To Reproduce
Steps to reproduce the behavior
from pyscipopt import Model
model = Model()
x = model.addMatrixVar((3, 2))
# MatrixVariable([Expr({Term(x1): 1.0, Term(x2): 1.0}),
# Expr({Term(x3): 1.0, Term(x4): 1.0}),
# Expr({Term(x5): 1.0, Term(x6): 1.0})], dtype=object)
type(x.sum(axis=1))
# pyscipopt.scip.MatrixVariable
x.sum(axis=1).vtype() # MatrixVariable has vtype method
# File src/pyscipopt/scip.pxi:1887, in pyscipopt.scip.MatrixVariable.vtype()
# AttributeError: 'pyscipopt.scip.Expr' object has no attribute 'vtype'Expected behavior
A clear and concise description of what you expected to happen.
MatrixVariable.sum(axis=...) should return MatrixExpr
Screenshots
If applicable, add screenshots to help explain your problem.
System
- OS: Windows 11
- Version: 24H2 (26100.4061)
- SCIP version: 9.2.4
- pyscipopt version: 5.7.1
- How did you install
pyscipopt? pip via pypi
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels