From d63bff159fbe0c195ce1b469cfe986b497471936 Mon Sep 17 00:00:00 2001 From: Johannes Schmitt Date: Wed, 18 Sep 2024 12:29:50 +0200 Subject: [PATCH] Fix `prod_diagonal` --- src/matrix.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix.jl b/src/matrix.jl index 7b9d441044..73ec2c498c 100644 --- a/src/matrix.jl +++ b/src/matrix.jl @@ -345,7 +345,7 @@ Return the diagonal of `A` as an array. diagonal(A::MatrixElem{T}) where {T} = T[A[i, i] for i in 1:min(nrows(A), ncols(A))] function prod_diagonal(A::MatrixElem{T}) where {T} - return prod(T[A[i, i] for i = 1:nrows(A)]) + return prod(diagonal(A)) end ################################################################################