dwave.optimization.model.States.clear#
- States.clear()#
Clear any saved states.
Clears any memory allocated to the states.
Examples
This example clears a state set on an integer decision symbol.
>>> from dwave.optimization.model import Model >>> model = Model() >>> i = model.integer(2) >>> model.states.resize(3) >>> i.set_state(0, [3, 5]) >>> print(i.state(0)) [3. 5.] >>> model.states.clear()