From 3c5a5d2fa78a4e6d15547e8427ff691578ab1362 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Tue, 17 Jun 2025 11:32:11 +0200 Subject: [PATCH] fix: handle poor type inference in count_eigval_multiplicity function --- lib/ControlSystemsBase/src/analysis.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ControlSystemsBase/src/analysis.jl b/lib/ControlSystemsBase/src/analysis.jl index 693e7dab7..b1000b078 100644 --- a/lib/ControlSystemsBase/src/analysis.jl +++ b/lib/ControlSystemsBase/src/analysis.jl @@ -43,7 +43,7 @@ function poles(sys::TransferFunction{<:TimeEvolution,SisoZpk{T,TR}}) where {T, T end -function count_eigval_multiplicity(p, location, e=eps(maximum(abs, p))) +function count_eigval_multiplicity(p, location, e=eps(maximum(abs, p, init=0.0))) # The init is to handle poor type inference with exotic number types n = length(p) n == 0 && return 0 for i = 1:n