Skip to content

Commit

Permalink
Merge pull request #65 from albheim/fix_print_functions
Browse files Browse the repository at this point in the history
Fix print for non-numeric items in minimization
  • Loading branch information
baggepinnen committed Aug 31, 2021
2 parents eecb455 + 403d7b6 commit c7418d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Hyperopt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ function Base.show(io::IO, ho::Hyperoptimizer)
end
println(io)
for (i, v) in enumerate(ho.minimizer)
@printf(io, "%9.4g ", v)
if v isa Number
@printf(io, "%9.4g ", v)
else
@printf(io, "%9s ", v)
end
end
println()
end
Expand Down

0 comments on commit c7418d1

Please sign in to comment.