Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix _VarArray size initialization logic
  • Loading branch information
Zeroto521 committed Aug 20, 2025
commit 36e90662a821c4d864adb574dde3fdc1c2bc3ec4
4 changes: 2 additions & 2 deletions src/pyscipopt/scip.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -2509,8 +2509,8 @@ cdef class _VarArray:
else:
raise TypeError(f"Expected Variable or list of Variable, got {type(vars)}.")

if vars:
self.size = len(vars)
self.size = len(vars)
if self.size:
self.ptr = <SCIP_VAR**> malloc(self.size * sizeof(SCIP_VAR*))
for i, var in enumerate(vars):
if not isinstance(var, Variable):
Expand Down