Skip to content

Commit

Permalink
backwards compat for stats argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Pepijn de Vos committed Oct 16, 2023
1 parent 7c0b301 commit 45efdc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ensemble/ensemble_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ struct EnsembleSolution{T, N, S, U} <: AbstractEnsembleSolution{T, N, S}
converged::Bool
stats::U
end
function EnsembleSolution(sim, dims::NTuple{N}, elapsedTime, converged, stats) where {N}
function EnsembleSolution(sim, dims::NTuple{N}, elapsedTime, converged, stats=nothing) where {N}

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

View check run for this annotation

Codecov / codecov/patch

src/ensemble/ensemble_solutions.jl#L34

Added line #L34 was not covered by tests
EnsembleSolution{eltype(eltype(sim)), N, typeof(sim), typeof(stats)}(sim, elapsedTime, converged, stats)
end
function EnsembleSolution(sim, elapsedTime, converged, stats)
function EnsembleSolution(sim, elapsedTime, converged, stats=nothing)

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

View check run for this annotation

Codecov / codecov/patch

src/ensemble/ensemble_solutions.jl#L37

Added line #L37 was not covered by tests
EnsembleSolution(sim, (length(sim),), elapsedTime, converged, stats)
end # Vector of some type which is not an array
function EnsembleSolution(sim::T, elapsedTime,
converged, stats) where {T <: AbstractVector{T2}
converged, stats=nothing) where {T <: AbstractVector{T2}
} where {T2 <:
AbstractArray}
EnsembleSolution{eltype(eltype(sim)), ndims(sim[1]) + 1,
Expand Down

0 comments on commit 45efdc5

Please sign in to comment.