Skip to content

Commit e7f3eff

Browse files
authored
[Utilities] fix print for upcoming VectorNonlinearFunction (#2245)
1 parent b3909a1 commit e7f3eff

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Utilities/print.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function _to_string(
269269
model::MOI.ModelLike,
270270
f::MOI.AbstractVectorFunction,
271271
)
272-
rows = map(fi -> _to_string(options, model, fi), eachscalar(f))
272+
rows = map(fi -> _to_string(options, model, fi), scalarize(f))
273273
max_length = maximum(length.(rows))
274274
s = join(map(r -> string("", rpad(r, max_length), ""), rows), '\n')
275275
return string(
@@ -290,10 +290,7 @@ function _to_string(
290290
)
291291
return string(
292292
"\\begin{bmatrix}\n",
293-
join(
294-
map(fi -> _to_string(options, model, fi), eachscalar(f)),
295-
"\\\\\n",
296-
),
293+
join(map(fi -> _to_string(options, model, fi), scalarize(f)), "\\\\\n"),
297294
"\\end{bmatrix}",
298295
)
299296
end

0 commit comments

Comments
 (0)