From e9837ee6da0111d7703d4131313d6ff52557cf90 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Sat, 14 Nov 2020 09:57:49 +0100 Subject: [PATCH] Update promotion (#394) Solves the issue with `stepplot` in #378 --- src/timeresp.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timeresp.jl b/src/timeresp.jl index 8a07cfc96..4799a65ec 100644 --- a/src/timeresp.jl +++ b/src/timeresp.jl @@ -165,7 +165,7 @@ function lsim(sys::AbstractStateSpace, u::Function, t::AbstractVector; elseif !(u0 isa Number && nu == 1) && (size(u0) != (nu,) && size(u0) != (nu,1)) error("return value of u must be of size nu") end - T = promote_type(Float64, eltype(x0)) + T = promote_type(Float64, eltype(x0), numeric_type(sys)) dt = T(t[2] - t[1])