Skip to content

Commit

Permalink
fix: attempt to fix EnsembleSummary for cases where output_funcs are …
Browse files Browse the repository at this point in the history
…used
  • Loading branch information
SebastianM-C committed Feb 1, 2024
1 parent 4ef274b commit 4a8e883
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ensemble/ensemble_analysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ timestep_mean(sim, ::Colon) = timeseries_steps_mean(sim)
function timestep_median(sim, i)
arr = componentwise_vectors_timestep(sim, i)
if typeof(first(arr)) <: AbstractArray
return reshape([median(x) for x in arr], size(sim.u[1].u[i])...)
return reshape([median(x) for x in arr], size(sim[1, i])...)

Check warning on line 35 in src/ensemble/ensemble_analysis.jl

View check run for this annotation

Codecov / codecov/patch

src/ensemble/ensemble_analysis.jl#L35

Added line #L35 was not covered by tests
else
return median(arr)
end
Expand All @@ -41,7 +41,7 @@ timestep_median(sim, ::Colon) = timeseries_steps_median(sim)
function timestep_quantile(sim, q, i)
arr = componentwise_vectors_timestep(sim, i)
if typeof(first(arr)) <: AbstractArray
return reshape([quantile(x, q) for x in arr], size(sim.u[1].u[i])...)
return reshape([quantile(x, q) for x in arr], size(sim[1, i])...)

Check warning on line 44 in src/ensemble/ensemble_analysis.jl

View check run for this annotation

Codecov / codecov/patch

src/ensemble/ensemble_analysis.jl#L44

Added line #L44 was not covered by tests
else
return quantile(arr, q)
end
Expand Down

0 comments on commit 4a8e883

Please sign in to comment.