From f8ce7e87ff14d462ec1f85635bbb0b9ee15d3a0f Mon Sep 17 00:00:00 2001 From: Michiel Cottaar <MichielCottaar@protonmail.com> Date: Sat, 25 May 2024 16:29:34 +0100 Subject: [PATCH] Apply alternate variable function to whole vector at once --- src/variables.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/variables.jl b/src/variables.jl index c5d9c2e..2f4ce7c 100644 --- a/src/variables.jl +++ b/src/variables.jl @@ -343,7 +343,7 @@ end function (var::AlternateVariable)(args...; kwargs...) other_var = variables[var.other_var] apply_from_other(res::VariableType) = var.from_other(res) - apply_from_other(res::AbstractArray{<:VariableType}) = var.from_other.(res) + apply_from_other(res::AbstractVector{<:VariableType}) = var.from_other(res) apply_from_other(res::NamedTuple) = NamedTuple(k => apply_from_other(v) for (k, v) in pairs(res)) return apply_from_other(other_var(args...; kwargs...)) end -- GitLab