Currently returns a ValueError with a technically correct but not hugely helpful error message:
>>> from dwave.optimization import Model
>>> model = Model()
>>> i = model.integer(3, lower_bound=0, upper_bound=20)
>>> i.has_state()
ValueError: index out of range: 0
Would it make sense to capture the model.states.size() == 0 condition and if zero, return a TypeError with an explicit error message?
Currently returns a ValueError with a technically correct but not hugely helpful error message:
Would it make sense to capture the
model.states.size() == 0condition and if zero, return a TypeError with an explicit error message?