Skip to content

Commit f18e254

Browse files
committed
Fix _init_identity_matrix in bfgs.jl
1 parent 77501f4 commit f18e254

File tree

1 file changed

+2
-2
lines changed
  • src/multivariate/solvers/first_order

1 file changed

+2
-2
lines changed

src/multivariate/solvers/first_order/bfgs.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ mutable struct BFGSState{Tx, Tm, T,G} <: AbstractOptimizerState
5858
@add_linesearch_fields()
5959
end
6060

61-
function _init_identity_matrix(x::AbstractArray{T}, scale::T = T(1)) where {T}
61+
function _init_identity_matrix(x::AbstractArray{T}, scale = T(1)) where {T}
6262
x_ = reshape(x, :)
6363
Id = x_ .* x_' .* false
6464
idxs = diagind(Id)
65-
@. @view(Id[idxs]) = scale * true
65+
@. @view(Id[idxs]) = T(scale) * true
6666
return Id
6767
end
6868

0 commit comments

Comments
 (0)