Skip to content

Commit f6d15d0

Browse files
fix syms conversion
1 parent 8094a37 commit f6d15d0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/solutions/solution_interface.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,21 +248,21 @@ function interpret_vars(vars,sol,syms)
248248
if typeof(var) <: Union{Tuple,AbstractArray} #eltype(var) <: Symbol # Some kind of iterable
249249
tmp = []
250250
for x in var
251-
if typeof(x) <: Integer
252-
push!(tmp,x)
253-
else
251+
if typeof(x) <: Symbol || Symbol(typeof(x)) == :Operation || Symbol(typeof(x)) == :Variable
254252
push!(tmp,something(findfirst(isequal(Symbol(x)), syms), 0))
253+
else
254+
push!(tmp,x)
255255
end
256256
end
257257
if typeof(var) <: Tuple
258258
var_int = tuple(tmp...)
259259
else
260260
var_int = tmp
261261
end
262-
elseif typeof(var) <: Integer
263-
var_int = var
264-
else
262+
elseif typeof(var) <: Symbol || Symbol(typeof(var)) == :Operation || Symbol(typeof(var)) == :Variable
265263
var_int = something(findfirst(isequal(Symbol(var)), syms), 0)
264+
else
265+
var_int = var
266266
end
267267
push!(tmp_vars,var_int)
268268
end

0 commit comments

Comments
 (0)