Skip to content

Commit

Permalink
[Utilities] fix print for upcoming VectorNonlinearFunction (#2245)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Aug 4, 2023
1 parent b3909a1 commit e7f3eff
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Utilities/print.jl
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ function _to_string(
model::MOI.ModelLike,
f::MOI.AbstractVectorFunction,
)
rows = map(fi -> _to_string(options, model, fi), eachscalar(f))
rows = map(fi -> _to_string(options, model, fi), scalarize(f))
max_length = maximum(length.(rows))
s = join(map(r -> string("", rpad(r, max_length), ""), rows), '\n')
return string(
Expand All @@ -290,10 +290,7 @@ function _to_string(
)
return string(
"\\begin{bmatrix}\n",
join(
map(fi -> _to_string(options, model, fi), eachscalar(f)),
"\\\\\n",
),
join(map(fi -> _to_string(options, model, fi), scalarize(f)), "\\\\\n"),
"\\end{bmatrix}",
)
end
Expand Down

0 comments on commit e7f3eff

Please sign in to comment.