Skip to content

Commit

Permalink
Fix docs for printing changes in v1.10 (#3643)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Dec 26, 2023
1 parent 57bd36a commit 9993bde
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/src/manual/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Use [`Containers.rowtable`](@ref) to convert the `Array` into a

```jldoctest containers_array
julia> table = Containers.rowtable(x; header = [:I, :J, :value])
6-element Vector{NamedTuple{(:I, :J, :value), Tuple{Int64, Int64, Tuple{Int64, Int64}}}}:
6-element Vector{@NamedTuple{I::Int64, J::Int64, value::Tuple{Int64, Int64}}}:
(I = 1, J = 1, value = (1, 1))
(I = 2, J = 1, value = (2, 1))
(I = 1, J = 2, value = (1, 2))
Expand Down Expand Up @@ -235,7 +235,7 @@ Use [`Containers.rowtable`](@ref) to convert the `DenseAxisArray` into a

```jldoctest containers_dense
julia> table = Containers.rowtable(x; header = [:I, :J, :value])
4-element Vector{NamedTuple{(:I, :J, :value), Tuple{Int64, Symbol, Tuple{Int64, Symbol}}}}:
4-element Vector{@NamedTuple{I::Int64, J::Symbol, value::Tuple{Int64, Symbol}}}:
(I = 1, J = :A, value = (1, :A))
(I = 2, J = :A, value = (2, :A))
(I = 1, J = :B, value = (1, :B))
Expand Down Expand Up @@ -344,7 +344,7 @@ Use [`Containers.rowtable`](@ref) to convert the `SparseAxisArray` into a

```jldoctest containers_sparse
julia> table = Containers.rowtable(x; header = [:I, :J, :value])
4-element Vector{NamedTuple{(:I, :J, :value), Tuple{Int64, Symbol, Tuple{Int64, Symbol}}}}:
4-element Vector{@NamedTuple{I::Int64, J::Symbol, value::Tuple{Int64, Symbol}}}:
(I = 2, J = :A, value = (2, :A))
(I = 2, J = :B, value = (2, :B))
(I = 3, J = :A, value = (3, :A))
Expand Down
4 changes: 2 additions & 2 deletions src/Containers/tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ julia> model = Model();
julia> @variable(model, x[i=1:2, j=i:2] >= 0, start = i+j);
julia> Containers.rowtable(start_value, x; header = [:i, :j, :start])
3-element Vector{NamedTuple{(:i, :j, :start), Tuple{Int64, Int64, Float64}}}:
3-element Vector{@NamedTuple{i::Int64, j::Int64, start::Float64}}:
(i = 1, j = 2, start = 3.0)
(i = 1, j = 1, start = 2.0)
(i = 2, j = 2, start = 4.0)
julia> Containers.rowtable(x)
3-element Vector{NamedTuple{(:x1, :x2, :y), Tuple{Int64, Int64, VariableRef}}}:
3-element Vector{@NamedTuple{x1::Int64, x2::Int64, y::VariableRef}}:
(x1 = 1, x2 = 2, y = x[1,2])
(x1 = 1, x2 = 1, y = x[1,1])
(x1 = 2, x2 = 2, y = x[2,2])
Expand Down
2 changes: 1 addition & 1 deletion src/JuMP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ julia> set_optimize_hook(model, my_hook)
my_hook (generic function with 1 method)
julia> optimize!(model; test_arg = true)
Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:test_arg,), Tuple{Bool}}}(:test_arg => 1)
Base.Pairs{Symbol, Bool, Tuple{Symbol}, @NamedTuple{test_arg::Bool}}(:test_arg => 1)
Calling with `ignore_optimize_hook = true`
ERROR: NoOptimizer()
[...]
Expand Down

0 comments on commit 9993bde

Please sign in to comment.