Skip to content

Commit

Permalink
Fix errors in docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
arcondello committed Dec 11, 2024
1 parent 88c0d71 commit a8ecdd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dwave/optimization/mathematical.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def sqrt(x: ArraySymbol) -> SquareRoot:
>>> model.states.resize(1)
>>> with model.lock():
... print(sqrt_x.state())
4
4.0
See Also:
:class:`~dwave.optimization.symbols.SquareRoot`: equivalent symbol.
"""
Expand Down
2 changes: 1 addition & 1 deletion dwave/optimization/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def feasible(self, index: int = 0) -> bool:
>>> model = Model()
>>> b = model.binary()
>>> model.add_constraint(b) # doctest: +ELLIPSIS
<dwave.optimization.BinaryVariable at ...>
<dwave.optimization.symbols.BinaryVariable at ...>
>>> model.states.resize(2)
>>> b.set_state(0, 1) # Feasible
>>> b.set_state(1, 0) # Infeasible
Expand Down

0 comments on commit a8ecdd9

Please sign in to comment.