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)
1249
1249
Assignment (_lhs, _rhs)
1250
1250
end
1251
1251
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
+
1252
1258
function namespace_expr (
1253
1259
O, sys, n = nameof (sys); ivs = independent_variables (sys))
1254
1260
O = unwrap (O)
@@ -1278,7 +1284,7 @@ function namespace_expr(
1278
1284
end
1279
1285
elseif isvariable (O)
1280
1286
renamespace (n, O)
1281
- elseif O isa AbstractArray
1287
+ elseif O isa AbstractArray && is_array_of_symbolics (O)
1282
1288
let sys = sys, n = n
1283
1289
map (o -> namespace_expr (o, sys, n; ivs), O)
1284
1290
end
You can’t perform that action at this time.
0 commit comments