Skip to content

Commit

Permalink
Update AccessorsLinearAlgebraExt.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
aplavin authored Jul 31, 2024
1 parent bce86ef commit aa57078
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/AccessorsLinearAlgebraExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using LinearAlgebra: norm, normalize, diag, diagind

set(arr, ::typeof(normalize), val) = norm(arr) * val
function set(arr, ::typeof(norm), val)
omul = iszero(val) ? one(norm(arr)) : norm(arr)
omul = iszero(val) ? oneunit(norm(arr)) : norm(arr)
map(Base.Fix2(*, val / omul), arr)
end

Expand Down

0 comments on commit aa57078

Please sign in to comment.