Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix deprecated indexing in EnsembleSummary plot recipe #604

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

@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 @@
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
Loading