Skip to content

Commit

Permalink
fix deprecated indexing in EnsembleSummary plot recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianM-C committed Jan 26, 2024
1 parent 5d3ac43 commit d6bb6e2
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

Check warning on line 163 in src/ensemble/ensemble_solutions.jl

View check run for this annotation

Codecov / codecov/patch

src/ensemble/ensemble_solutions.jl#L163

Added line #L163 was not covered by tests
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) .*

Check warning on line 169 in src/ensemble/ensemble_solutions.jl

View check run for this annotation

Codecov / codecov/patch

src/ensemble/ensemble_solutions.jl#L168-L169

Added lines #L168 - L169 were not covered by tests
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

Check warning on line 183 in src/ensemble/ensemble_solutions.jl

View check run for this annotation

Codecov / codecov/patch

src/ensemble/ensemble_solutions.jl#L183

Added line #L183 was not covered by tests
ci_low = u - vecarr_to_vectors(sim.qlow)
ci_high = vecarr_to_vectors(sim.qhigh) - u
else
Expand Down

0 comments on commit d6bb6e2

Please sign in to comment.