From 5fc3e4e72b83e92be3a52c1328d26d41030b6629 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Thu, 24 Feb 2022 10:35:37 +0100 Subject: [PATCH] fix type instability in balance_statespace --- src/types/conversion.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/conversion.jl b/src/types/conversion.jl index 77a4f1050..90108d48b 100644 --- a/src/types/conversion.jl +++ b/src/types/conversion.jl @@ -176,7 +176,7 @@ function balance_statespace(A::AbstractMatrix, B::AbstractMatrix, C::AbstractMat return _balance_statespace(A,B,C, perm) catch @warn "Unable to balance state-space, returning original system" - return A,B,C,I + return A,B,C,convert(typeof(A), I(size(A, 1))) end end