From 7909d954a5eab10474bd0cf104c6e5ca6ff790a6 Mon Sep 17 00:00:00 2001 From: Thomas Christensen Date: Fri, 18 Oct 2024 12:28:19 +0200 Subject: [PATCH] nits to snf for nonstandard `AbstractArray`s (e.g., StaticArrays, but still doesn't work for nonsquare StaticMatrices) --- .vendor/SmithNormalForm/src/snf.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.vendor/SmithNormalForm/src/snf.jl b/.vendor/SmithNormalForm/src/snf.jl index 5a428582..77d14140 100644 --- a/.vendor/SmithNormalForm/src/snf.jl +++ b/.vendor/SmithNormalForm/src/snf.jl @@ -135,7 +135,6 @@ function init(M::AbstractSparseMatrix{R,Ti}; inverse=true) where {R, Ti} U = sparse(R, Ti, I, rows, rows) Uinv = inverse ? copy(U) : spzeros(R, Ti, 0, 0) - V = sparse(R, Ti, I, cols, cols) Vinv = inverse ? copy(V) : spzeros(R, Ti, 0, 0) @@ -143,7 +142,7 @@ function init(M::AbstractSparseMatrix{R,Ti}; inverse=true) where {R, Ti} end function init(M::AbstractMatrix{R}; inverse=true) where {R} - D = copy(M) + D = Matrix{R}(copy(M)) rows, cols = size(M) U = Matrix{R}(I, rows, rows)