Skip to content

Commit

Permalink
remove unbound type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Jun 13, 2022
1 parent b295aca commit 9716ad5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hammerstein_weiner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function lsim(sys::HammersteinWienerSystem{T}, u, t::AbstractArray{<:Real};
x0=fill(zero(T), nstates(sys)),
alg=Tsit5(),
abstol=1e-6, reltol=1e-6,
kwargs...) where {T,S}
kwargs...) where {T}

# Make u! in-place function of u
u! = if isa(u, Number) || isa(u,AbstractVector) # Allow for u to be a constant number or vector
Expand Down
2 changes: 1 addition & 1 deletion src/types/TimeEvolution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Discrete{T}(x::Discrete) where T = Discrete{T}(x.Ts)


undef_sampletime(::Type{Discrete{T}}) where T = Discrete{T}(UNDEF_SAMPLEPETIME)
undef_sampletime(::Type{Continuous}) where T = Continuous()
undef_sampletime(::Type{Continuous}) = Continuous()


# Promotion
Expand Down
4 changes: 2 additions & 2 deletions src/types/zpk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ zpk(var::AbstractString, Ts::Real) = zpk(tf(var, Ts))
zpk(z, p, k, Ts::Number) = zpk(z, p, k, Discrete(Ts))
zpk(z, p, k) = zpk(z, p, k, Continuous())
# Catch all 1(2) argument versions
zpk(gain, Ts::Number; kwargs...) where {T <: Number} = zpk(gain, Discrete(Ts))
zpk(gain; kwargs...) where {T <: Number} = zpk(gain, Continuous())
zpk(gain, Ts::Number; kwargs...) = zpk(gain, Discrete(Ts))
zpk(gain; kwargs...) = zpk(gain, Continuous())

# This method is required since the Base method uses promote_op(matprod, eltype(A), eltype(B)) which fails to infer correctly
function Base.:(*)(A::AbstractMatrix{<:Union{<:SisoZpk, <:SisoRational}}, B::AbstractMatrix{<:Union{<:SisoZpk, <:SisoRational}})
Expand Down

0 comments on commit 9716ad5

Please sign in to comment.