@@ -1062,15 +1062,15 @@ function compile_user_affect(affect::MutatingFunctionalAffect, cb, sys, dvs, ps;
10621062 zeros (sz)
10631063 end
10641064 obs_fun = build_explicit_observed_function (
1065- sys, reduce (vcat, Symbolics. scalarize .(obs_exprs); init = [] );
1065+ sys, Symbolics. scalarize .(obs_exprs);
10661066 array_type = :tuple )
10671067 obs_sym_tuple = (obs_syms... ,)
10681068
10691069 # okay so now to generate the stuff to assign it back into the system
10701070 mod_pairs = mod_exprs .=> mod_syms
10711071 mod_names = (mod_syms... , )
10721072 mod_og_val_fun = build_explicit_observed_function (
1073- sys, reduce (vcat, Symbolics. scalarize .(first .(mod_pairs)); init = [] );
1073+ sys, Symbolics. scalarize .(first .(mod_pairs));
10741074 array_type = :tuple )
10751075
10761076 upd_funs = NamedTuple {mod_names} ((setu .((sys,), first .(mod_pairs))... ,))
@@ -1084,7 +1084,8 @@ function compile_user_affect(affect::MutatingFunctionalAffect, cb, sys, dvs, ps;
10841084 let user_affect = func (affect), ctx = context (affect)
10851085 function (integ)
10861086 # update the to-be-mutated values; this ensures that if you do a no-op then nothing happens
1087- upd_component_array = NamedTuple {mod_names} (mod_og_val_fun (integ. u, integ. p... , integ. t))
1087+ modvals = mod_og_val_fun (integ. u, integ. p... , integ. t)
1088+ upd_component_array = NamedTuple {mod_names} (modvals)
10881089
10891090 # update the observed values
10901091 obs_component_array = NamedTuple {obs_sym_tuple} (obs_fun (integ. u, integ. p... , integ. t))
0 commit comments