Skip to content

Commit

Permalink
Merge 8966a66 into 54905b9
Browse files Browse the repository at this point in the history
  • Loading branch information
bqpd committed Feb 12, 2021
2 parents 54905b9 + 8966a66 commit d90f4c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions docs/source/examples/performance_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,11 @@ def setup(self):
sol = M.solve(verbosity=0)
print(sol.diff("solution.pkl", showvars=vars_of_interest, sortbymodel=False))

# this will only make an image when run in jupyter notebook
# from gpkit.interactive.sankey import Sankey
from gpkit.interactive.sankey import Sankey
variablesankey = Sankey(sol, M).diagram(AC.wing.A)
sankey = Sankey(sol, M).diagram(width=1200, height=400, maxlinks=30)
sankey # pylint: disable=pointless-statement
try:
from gpkit.interactive.sankey import Sankey
variablesankey = Sankey(sol, M).diagram(AC.wing.A)
sankey = Sankey(sol, M).diagram(width=1200, height=400, maxlinks=30)
# the line below shows an interactive graph if run in jupyter notebook
sankey # pylint: disable=pointless-statement
except (ImportError, ModuleNotFoundError):
print("Making Sankey diagrams requires the ipysankeywidget package")
2 changes: 1 addition & 1 deletion gpkit/solution_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def almost_equal(self, other, reltol=1e-3, sens_abstol=0.01):
def diff(self, other, showvars=None, *,
constraintsdiff=True, senssdiff=False, sensstol=0.1,
absdiff=False, abstol=0, reldiff=True, reltol=1.0,
sortmodelsbysenss= True, **tableargs):
sortmodelsbysenss=True, **tableargs):
"""Outputs differences between this solution and another
Arguments
Expand Down

0 comments on commit d90f4c7

Please sign in to comment.