Skip to content

Commit 557b01f

Browse files
committed
fix
1 parent fa0041f commit 557b01f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/utils.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,12 @@ function check_variables(dvs, iv)
156156
end
157157

158158
function check_var_types(sys_type::Type{T}, dvs) where T <: AbstractSystem
159-
any(u -> !(symtype(u) <: Number), dvs) && error("The type of unknown variables must be a numeric type.")
160-
if sys_type == ODESystem || sys_type == SDESystem || sys_type == PDESystem
161-
any(u -> !(symtype(u) <: AbstractFloat), dvs) && error("The type of unknown variables for an SDESystem, PDESystem, or ODESystem must be a float.")
159+
if any(u -> !(symtype(u) <: Number), dvs)
160+
error("The type of unknown variables must be a numeric type.")
161+
elseif any(u -> (symtype(u) !== symtype(dvs[1])), dvs)
162+
error("The type of all the unknown variables in a system must all be the same.")
163+
elseif sys_type == ODESystem || sys_type == SDESystem || sys_type == PDESystem
164+
any(u -> !(symtype(u) == Real), dvs) && error("The type of unknown variables for an SDESystem, PDESystem, or ODESystem should not be a concrete numeric type.")
162165
end
163166
nothing
164167
end

0 commit comments

Comments
 (0)