From aa57078e5cd8fe01f86f24d41c58b7fd9a6c16dc Mon Sep 17 00:00:00 2001 From: Alexander Plavin Date: Tue, 30 Jul 2024 23:35:52 -0400 Subject: [PATCH] Update AccessorsLinearAlgebraExt.jl --- ext/AccessorsLinearAlgebraExt.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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