Skip to content

Commit 43746e2

Browse files
committed
Use MatrixGenExpr view for GenExpr arrays
1 parent 2043a0d commit 43746e2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
### Fixed
99
- Removed `Py_INCREF`/`Py_DECREF` on `Model` in `catchEvent`/`dropEvent` that caused memory leak for imbalanced usage
1010
- Used `getIndex()` instead of `ptr()` for sorting nonlinear expression terms to avoid nondeterministic behavior
11+
- Return `MatrixGenExpr` in `buildGenExprObj` instead of `MatrixExpr`
1112
### Changed
1213
- Speed up `constant * Expr` via C-level API
1314
### Removed

src/pyscipopt/expr.pxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def buildGenExprObj(expr):
210210
GenExprs = np.empty(expr.shape, dtype=object)
211211
for idx in np.ndindex(expr.shape):
212212
GenExprs[idx] = buildGenExprObj(expr[idx])
213-
return GenExprs.view(MatrixExpr)
213+
return GenExprs.view(MatrixGenExpr)
214214

215215
else:
216216
assert isinstance(expr, GenExpr)

0 commit comments

Comments
 (0)