diff --git a/ext/AccessorsLinearAlgebraExt.jl b/ext/AccessorsLinearAlgebraExt.jl index 9ab4a23f..19b70d04 100644 --- a/ext/AccessorsLinearAlgebraExt.jl +++ b/ext/AccessorsLinearAlgebraExt.jl @@ -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