-
-
Notifications
You must be signed in to change notification settings - Fork 233
Closed
Description
The recently introduced type check here
ModelingToolkit.jl/src/utils.jl
Line 1240 in 57c79e9
| !(symtype(diffvar) === Real || eltype(symtype(diffvar)) === Real) && |
Tests error with, e.g.
ArgumentError: Differential variable var"⟨a′*a⟩"(t) has type Complex. Differential variables should not be concretely typed.The check is too restrictive IMHO, since it's not strictly necessary for things to be <: Real here. Would it be possible to loosen the constraints? Would it be enough to check whether the type is abstract and <: Number?
Also, if you want to be picky: the check doesn't actually do what the error message says. Checking for symtype(x) === Real isn't actually checking for concretely typed variables.
Metadata
Metadata
Assignees
Labels
No labels