File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,12 @@ function NonlinearSystem(eqs; kwargs...)
219219 push! (new_ps, p)
220220 end
221221 else
222+ if symbolic_type (p) == ArraySymbolic () &&
223+ Symbolics. shape (unwrap (p)) != Symbolics. Unknown ()
224+ for i in eachindex (p)
225+ delete! (new_ps, p[i])
226+ end
227+ end
222228 push! (new_ps, p)
223229 end
224230 end
Original file line number Diff line number Diff line change 380380 @test_throws [" single equation" , " unknown" ] IntervalNonlinearFunctionExpr (
381381 sys, (0.0 , 1.0 ))
382382end
383+
384+ @testset " Vector parameter used unscalarized and partially scalarized" begin
385+ @variables x y
386+ @parameters p[1 : 2 ] (f:: Function )(.. )
387+
388+ @mtkbuild sys = NonlinearSystem ([x^ 2 - p[1 ]^ 2 ~ 0 , y^ 2 ~ f (p)])
389+ @test ! any (isequal (p[1 ]), parameters (sys))
390+ @test is_parameter (sys, p)
391+ end
You can’t perform that action at this time.
0 commit comments