Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add __index__ to preference classes #70

Open
wants to merge 1 commit into
base: 1.0
Choose a base branch
from

Conversation

yannick-couzinie
Copy link

@yannick-couzinie yannick-couzinie commented Jun 29, 2023

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant