I cannot pinpoint when exactly this broke, but at least in Python 3.11.2 if you try to run the tests (or examples in sqaodpy/examples) you either get segmentation faults or errors complaining that maximize/minimize cannot be interpreted as integers.
Defining __index__ = __int__ in the maximize/minimize classes solves this problem.
I cannot pinpoint when exactly this broke, but at least in Python 3.11.2 if you try to run the tests (or examples in sqaodpy/examples) you either get segmentation faults or errors complaining that maximize/minimize cannot be interpreted as integers.
Defining
__index__ = __int__
in the maximize/minimize classes solves this problem.