File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1249,6 +1249,12 @@ function namespace_assignment(eq::Assignment, sys)
12491249 Assignment (_lhs, _rhs)
12501250end
12511251
1252+ function is_array_of_symbolics (x)
1253+ symbolic_type (x) == ArraySymbolic () && return true
1254+ symbolic_type (x) == ScalarSymbolic () && return false
1255+ x isa AbstractArray && any (y -> symbolic_type (y) != NotSymbolic () || is_array_of_symbolics (y), x)
1256+ end
1257+
12521258function namespace_expr (
12531259 O, sys, n = nameof (sys); ivs = independent_variables (sys))
12541260 O = unwrap (O)
@@ -1278,7 +1284,7 @@ function namespace_expr(
12781284 end
12791285 elseif isvariable (O)
12801286 renamespace (n, O)
1281- elseif O isa AbstractArray
1287+ elseif O isa AbstractArray && is_array_of_symbolics (O)
12821288 let sys = sys, n = n
12831289 map (o -> namespace_expr (o, sys, n; ivs), O)
12841290 end
You can’t perform that action at this time.
0 commit comments