You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we do not append a semicolon after an expression, it will be displayed automatically in both REPL and IJulia (i.e., Jupyter notebook). At the beginning of an optimization program, we usually define a model. Such a model can be properly displayed automatically in REPL but not in IJulia.
A minimal reproducible example in IJulia
As we see above, the show and the display("text/plain", model) methods work well. However, the single argument display only shows incomplete information. Besides, the automatic display at the end of a cell does not work as expected.
In this discussion as well as the official documentation, it is recommended to override show to customize the behaviour of display. It is strange that show works well as above in IJulia but not display.
I mean that we simply run a cell in Jupyter notebook without calling a display function like print, show, or display explicitly. By default, IJulia will display the final result of the cell automatically (similar to REPL) if we did not terminate it with a semicolon.
I figured it out according to your reply. Here, it seems IJulia tries to display the model using display("text/latex", model). However, in the beginning, the feasibility and the subject to are both empty, and thus the display shown above is actually right. I thought that the display in IJulia was identical to that in REPL, which was my mistake. To get the same display like that in REPL, we should call display("text/plain", model) or show(model) manually, as demonstrated in the above figure.
Once we have optimized the model, the default display in IJulia is obviously right now.
When we do not append a semicolon after an expression, it will be displayed automatically in both REPL and IJulia (i.e., Jupyter notebook). At the beginning of an optimization program, we usually define a
model
. Such a model can be properly displayed automatically in REPL but not in IJulia.A minimal reproducible example in IJulia
As we see above, the
show
and thedisplay("text/plain", model)
methods work well. However, the single argumentdisplay
only shows incomplete information. Besides, the automatic display at the end of a cell does not work as expected.In this discussion as well as the official documentation, it is recommended to override
show
to customize the behaviour ofdisplay
. It is strange thatshow
works well as above in IJulia but notdisplay
.This issue may be related to issue #2293.
Version info
The text was updated successfully, but these errors were encountered: