Skip to content

Commit

Permalink
Fix type of initial_scale in reset_search_direction!
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Oct 30, 2024
1 parent 77501f4 commit 588d95b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utilities/perform_linesearch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function reset_search_direction!(state, d, method::BFGS)
if method.initial_stepnorm === nothing
state.invH .= _init_identity_matrix(state.x)
else
initial_scale = method.initial_stepnorm * inv(norm(gradient(d), Inf))
initial_scale = T(method.initial_stepnorm) * inv(norm(gradient(d), Inf))
state.invH .= _init_identity_matrix(state.x, initial_scale)
end
else
Expand Down

0 comments on commit 588d95b

Please sign in to comment.