Skip to content

Commit 34c1f5e

Browse files
fix: make symbolic_evaluate unwrap everything it returns
1 parent c3f54a6 commit 34c1f5e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/variable.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,16 @@ end
499499
SymbolicIndexingInterface.getname(x, val=_fail) = _getname(unwrap(x), val)
500500

501501
function SymbolicIndexingInterface.symbolic_evaluate(ex::Union{Num, Arr, Symbolic, Equation, Inequality}, d::Dict; kwargs...)
502-
fixpoint_sub(ex, d; kwargs...)
502+
val = fixpoint_sub(ex, d; kwargs...)
503+
return _recursive_unwrap(val)
504+
end
505+
506+
function _recursive_unwrap(val)
507+
if symbolic_type(val) == NotSymbolic() && val isa AbstractArray
508+
return _recursive_unwrap.(val)
509+
else
510+
return unwrap(val)
511+
end
503512
end
504513

505514
"""

0 commit comments

Comments
 (0)