Skip to content

Commit 8b66ba0

Browse files
committed
Added code-block to dualize() examples.
1 parent b6c26fe commit 8b66ba0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

linopy/dual.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,11 @@ def dualize(
541541
542542
Examples
543543
--------
544-
>>> m2 = m.dualize()
545-
>>> m2.solve(solver_name="gurobi", Method=2, Crossover=0)
546-
>>> gap = abs(m.objective.value - m2.objective.value)
544+
.. code-block:: python
545+
546+
m2 = m.dualize()
547+
m2.solve(solver_name="gurobi", Method=2, Crossover=1)
548+
gap = abs(m.objective.value - m2.objective.value)
547549
"""
548550
from linopy.model import Model
549551

0 commit comments

Comments
 (0)