Skip to content

Commit 2afab33

Browse files
more robust
1 parent 90b7dde commit 2afab33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/systems/nonlinear/nonlinearsystem.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ function NonlinearSystem(eqs, states, ps;
6565
systems=NonlinearSystem[],
6666
connection_type=nothing,
6767
)
68-
eqs = [0 ~ x.rhs - x.lhs for x in eqs]
69-
68+
# Move things over, but do not touch array expressions
69+
eqs = [x isa Equation ? 0 ~ x.rhs - x.lhs : x for x in eqs]
70+
7071
if !(isempty(default_u0) && isempty(default_p))
7172
Base.depwarn("`default_u0` and `default_p` are deprecated. Use `defaults` instead.", :NonlinearSystem, force=true)
7273
end

0 commit comments

Comments
 (0)