@@ -506,15 +506,38 @@ function SymbolicIndexingInterface.remake_buffer(indp, oldbuf::MTKParameters, va
506506 @set! newbuf. nonnumeric = Tuple (Vector {Any} (undef, length (buf))
507507 for buf in newbuf. nonnumeric)
508508
509+ syms = collect (keys (vals))
510+ vals = Dict {Any, Any} (vals)
511+ for sym in syms
512+ symbolic_type (sym) == ArraySymbolic () || continue
513+ is_parameter (indp, sym) && continue
514+ stype = symtype (unwrap (sym))
515+ stype <: AbstractArray || continue
516+ Symbolics. shape (sym) == Symbolics. Unknown () && continue
517+ for i in eachindex (sym)
518+ vals[sym[i]] = vals[sym][i]
519+ end
520+ end
521+
509522 # If the parameter buffer is an `MTKParameters` object, `indp` must eventually drill
510523 # down to an `AbstractSystem` using `symbolic_container`. We leverage this to get
511524 # the index cache.
512525 ic = get_index_cache (indp_to_system (indp))
513526 for (p, val) in vals
514527 idx = parameter_index (indp, p)
515- validate_parameter_type (ic, p, idx, val)
516- _set_parameter_unchecked! (
517- newbuf, val, idx; update_dependent = false )
528+ if idx != = nothing
529+ validate_parameter_type (ic, p, idx, val)
530+ _set_parameter_unchecked! (
531+ newbuf, val, idx; update_dependent = false )
532+ elseif symbolic_type (p) == ArraySymbolic ()
533+ for (i, j) in zip (eachindex (p), eachindex (val))
534+ pi = p[i]
535+ idx = parameter_index (indp, pi )
536+ validate_parameter_type (ic, pi , idx, val[j])
537+ _set_parameter_unchecked! (
538+ newbuf, val[j], idx; update_dependent = false )
539+ end
540+ end
518541 end
519542
520543 @set! newbuf. tunable = narrow_buffer_type_and_fallback_undefs .(
0 commit comments