File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed
Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ MLUtils = "0.4.8"
5858Makie = " 0.22, 0.23, 0.24"
5959NCDatasets = " 0.14.8"
6060OptimizationOptimisers = " 0.3.7"
61- PrettyTables = " 3.1.2"
61+ PrettyTables = " 2.4.0, 3.1.2"
6262ProgressMeter = " 1.10.4"
6363Reexport = " 1.2.2"
6464Static = " 1.3.1"
Original file line number Diff line number Diff line change 6868
6969function Base. show(io:: IO , :: MIME"text/plain" , pc:: ParameterContainer )
7070 table = pc. table
71- return PrettyTables. pretty_table(
72- io, table;
73- column_labels = collect(keys(table. axes[2 ])),
74- row_labels = collect(keys(table. axes[1 ])),
75- alignment = :r,
76- )
71+
72+ col_labels = collect(keys(table. axes[2 ]))
73+ row_labels = collect(keys(table. axes[1 ]))
74+
75+ return @static if isdefined(PrettyTables, :PrintingSpec)
76+ # PrettyTables v3+
77+ PrettyTables. pretty_table(
78+ io,
79+ table;
80+ column_labels = col_labels,
81+ row_labels = row_labels,
82+ alignment = :r,
83+ )
84+ else
85+ # PrettyTables v2
86+ PrettyTables. pretty_table(
87+ io,
88+ table;
89+ header = col_labels,
90+ row_labels = row_labels,
91+ alignment = :r,
92+ )
93+ end
7794end
7895
7996# compact show for nested usage
You can’t perform that action at this time.
0 commit comments