You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In getSolutionIter, a list of 3-tuples is sorted, where the 3rd tuple item is a problem variable index. This throws a TypeError when the type(s) of variable indices are incomparable. There is no reason to assume a variable ID to be comparable, only identity (hashability) should be assumed.
Proposed solution
Only sort by the first two tuple items (which seems to be the intended logic).
In getSolutionIter change:
lst.sort() ----> lst.sort(key=lambda x: (x[0], x[1]))
Alternatively, if comparability is required by the programme logic, specify it in documentation and ideally via typing.
Library version: 2.2.1
Python: 3.12.5
The text was updated successfully, but these errors were encountered:
Description
In getSolutionIter, a list of 3-tuples is sorted, where the 3rd tuple item is a problem variable index. This throws a TypeError when the type(s) of variable indices are incomparable. There is no reason to assume a variable ID to be comparable, only identity (hashability) should be assumed.
Proposed solution
Only sort by the first two tuple items (which seems to be the intended logic).
In getSolutionIter change:
lst.sort() ----> lst.sort(key=lambda x: (x[0], x[1]))
Alternatively, if comparability is required by the programme logic, specify it in documentation and ideally via typing.
Library version: 2.2.1
Python: 3.12.5
The text was updated successfully, but these errors were encountered: