Skip to content

Commit ceb6d78

Browse files
Generalized lookup of derivative functions.
1 parent b338667 commit ceb6d78

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/symbolic/DAEquations/SymbolicTransform.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -806,10 +806,14 @@ function differentiate(e)
806806
if arg_der != zero
807807
# op does not contain full path to function in Julia 1.3, use typeof()
808808
typeofop = string(typeof(op))
809-
# remove typeof(...)
810-
typeofop = split(typeofop, "(")[2]
811-
typeofop = split(typeofop, ")")[1]
812-
path = split(typeofop, ".")
809+
if typeofop != "Symbol"
810+
# remove typeof(...)
811+
typeofop = split(typeofop, "(")[2]
812+
typeofop = split(typeofop, ")")[1]
813+
path = split(typeofop, ".")
814+
else
815+
path = split(string(op), ".")
816+
end
813817
if length(path) >= 2
814818
mod = path[end-1]
815819
else

0 commit comments

Comments
 (0)