From 4ebf264eb1ea58e5d0e6e5ddb9d44e14b707b192 Mon Sep 17 00:00:00 2001 From: wheeheee <104880306+wheeheee@users.noreply.github.com> Date: Sun, 27 Oct 2024 13:11:06 +0800 Subject: [PATCH] Relax `filt_stepstate` argument types (fix #573) --- src/Filters/filt.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Filters/filt.jl b/src/Filters/filt.jl index fb1e313d7..8a7e68f7b 100644 --- a/src/Filters/filt.jl +++ b/src/Filters/filt.jl @@ -392,7 +392,10 @@ function filt_stepstate(b::Union{AbstractVector{T}, T}, a::Union{AbstractVector{ # Solve si = A*si + B # (I - A)*si = B ((I - A) \ B) .*= scale_factor - end +end + +filt_stepstate(b::Union{AbstractVector{T}, T}, a::Union{AbstractVector{V}, V}) where {T<:Number,V<:Number} = + filt_stepstate(promote(b, a)...) function filt_stepstate(f::SecondOrderSections{:z,T}) where T biquads = f.biquads