@@ -948,7 +948,8 @@ dt: the time step
948948
949949```julia
950950ImplicitDiscreteFunction{iip,specialize}(f;
951- analytic = __has_analytic(f) ? f.analytic : nothing)
951+ analytic = __has_analytic(f) ? f.analytic : nothing,
952+ resid_prototype = __has_resid_prototype(f) ? f.resid_prototype : nothing)
952953```
953954
954955Note that only the function `f` itself is required. This function should
@@ -3065,6 +3066,9 @@ function ImplicitDiscreteFunction{iip, specialize}(f;
30653066 observed = __has_observed (f) ?
30663067 f. observed :
30673068 DEFAULT_OBSERVED,
3069+ resid_prototype = __has_resid_prototype (f) ?
3070+ f. resid_prototype :
3071+ nothing ,
30683072 sys = __has_sys (f) ? f. sys : nothing ,
30693073 initialization_data = __has_initialization_data (f) ? f. initialization_data :
30703074 nothing ) where {
@@ -3075,16 +3079,17 @@ function ImplicitDiscreteFunction{iip, specialize}(f;
30753079 sys = sys_or_symbolcache (sys, syms, paramsyms, indepsym)
30763080
30773081 if specialize === NoSpecialize
3078- ImplicitDiscreteFunction {iip, specialize, Any, Any, Any, Any, Any} (_f,
3082+ ImplicitDiscreteFunction {iip, specialize, Any, Any, Any, Any, Any, Any } (_f,
30793083 analytic,
30803084 observed,
30813085 sys,
3086+ resid_prototype,
30823087 initialization_data)
30833088 else
30843089 ImplicitDiscreteFunction{
3085- iip, specialize, typeof (_f), typeof (analytic), typeof (observed), typeof (sys),
3090+ iip, specialize, typeof (_f), typeof (analytic), typeof (observed), typeof (sys), typeof (resid_prototype ),
30863091 typeof (initialization_data)}(
3087- _f, analytic, observed, sys, initialization_data)
3092+ _f, analytic, observed, sys, resid_prototype, initialization_data)
30883093 end
30893094end
30903095
@@ -3101,12 +3106,12 @@ function unwrapped_f(f::ImplicitDiscreteFunction, newf = unwrapped_f(f.f))
31013106 specialize = specialization (f)
31023107
31033108 if specialize === NoSpecialize
3104- ImplicitDiscreteFunction{isinplace (f, 6 ), specialize, Any, Any,
3109+ ImplicitDiscreteFunction{isinplace (f, 5 ), specialize, Any , Any, Any,
31053110 Any, Any, Any}(newf, f. analytic, f. observed, f. sys, f. resid_prototype, f. initialization_data)
31063111 else
3107- ImplicitDiscreteFunction{isinplace (f, 6 ), specialize, typeof (newf),
3112+ ImplicitDiscreteFunction{isinplace (f, 5 ), specialize, typeof (newf),
31083113 typeof (f. analytic),
3109- typeof (f. observed), typeof (f. sys), typeof (f. initialization_data)}(newf,
3114+ typeof (f. observed), typeof (f. sys), typeof (resid_prototype), typeof ( f. initialization_data)}(newf,
31103115 f. analytic, f. observed, f. sys, f. resid_prototype, f. initialization_data)
31113116 end
31123117end
0 commit comments