From 45efdc5a9325b02518aaba6a0542246e052a1cbf Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Mon, 16 Oct 2023 11:38:46 +0200 Subject: [PATCH] backwards compat for stats argument --- src/ensemble/ensemble_solutions.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ensemble/ensemble_solutions.jl b/src/ensemble/ensemble_solutions.jl index fb02312e0..db3213289 100644 --- a/src/ensemble/ensemble_solutions.jl +++ b/src/ensemble/ensemble_solutions.jl @@ -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} 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) 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,