Skip to content

Using axes_sums_subject_to on a BinaryVariable with size 0 results in a crash when initializing a state #635

Description

@wbernoudy
In [1]: from dwave.optimization import Model

In [2]: model = Model()

In [3]: b = model.binary(shape=0, axes_sums_subject_to=[(0, ">=", 1)])

In [4]: model.lock()
Out[4]: <contextlib._GeneratorContextManager at 0x7ffff13952b0>

In [5]: model.states.resize(1)

In [6]: b.state(0)
zsh: floating point exception (core dumped)  ipython

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions