Skip to content

Commit

Permalink
Merge pull request #604 from SebastianM-C/ensemble2
Browse files Browse the repository at this point in the history
fix deprecated indexing in EnsembleSummary plot recipe
  • Loading branch information
ChrisRackauckas authored Jan 30, 2024
2 parents eac9a37 + d6bb6e2 commit a97cbb0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ensemble/ensemble_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,17 @@ end
end

@recipe function f(sim::EnsembleSummary;
trajectories = sim.u[1] isa AbstractArray ? eachindex(sim.u[1]) :
trajectories = sim.u.u[1] isa AbstractArray ? eachindex(sim.u.u[1]) :
1,
error_style = :ribbon, ci_type = :quantile)
if ci_type == :SEM
if sim.u[1] isa AbstractArray
if sim.u.u[1] isa AbstractArray
u = vecarr_to_vectors(sim.u)
else
u = [sim.u.u]
end
if sim.u[1] isa AbstractArray
ci_low = vecarr_to_vectors(VectorOfArray([sqrt.(sim.v[i] / sim.num_monte) .*
if sim.u.u[1] isa AbstractArray
ci_low = vecarr_to_vectors(VectorOfArray([sqrt.(sim.v.u[i] / sim.num_monte) .*
1.96 for i in 1:length(sim.v)]))
ci_high = ci_low
else
Expand All @@ -180,7 +180,7 @@ end
else
u = [sim.med.u]
end
if sim.u[1] isa AbstractArray
if sim.u.u[1] isa AbstractArray
ci_low = u - vecarr_to_vectors(sim.qlow)
ci_high = vecarr_to_vectors(sim.qhigh) - u
else
Expand Down

0 comments on commit a97cbb0

Please sign in to comment.