You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code seems to work,, though I would want to make sure you like the naming and approach before adding tests/etc.
import DiffEqBase: EnsembleSummary
function DiffEqBase.EnsembleSummary(sim::DiffEqBase.AbstractEnsembleSolution{T,N},
t=sim[1].t;quantiles=[0.05,0.95], centermedian =false) where {T,N}
iftypeof(sim[1]) <:DiffEqBase.DESolution
m,v =timeseries_point_meanvar(sim,t)
med =timeseries_point_median(sim,t)
qlow =timeseries_point_quantile(sim,quantiles[1],t)
qhigh =timeseries_point_quantile(sim,quantiles[2],t)
else
m,v =timeseries_steps_meanvar(sim)
med =timeseries_steps_median(sim)
qlow =timeseries_steps_quantile(sim,quantiles[1])
qhigh =timeseries_steps_quantile(sim,quantiles[2])
end
trajectories =length(sim)
DiffEqBase.EnsembleSummary{T,N,typeof(t),typeof(m),typeof(v),typeof(qlow),typeof(qhigh)}(t,centermedian ? med : m,v,qlow,qhigh,trajectories,sim.elapsedTime,sim.converged)
end
As another interfacepoint, the quantiles argument takes in an array, but only works ones of length two. Perhaps it should be a tuple to avoid giving the impression that you can pass in more than 2.
The text was updated successfully, but these errors were encountered:
The following code seems to work,, though I would want to make sure you like the naming and approach before adding tests/etc.
As another interfacepoint, the
quantiles
argument takes in an array, but only works ones of length two. Perhaps it should be a tuple to avoid giving the impression that you can pass in more than 2.The text was updated successfully, but these errors were encountered: