From 132495d45f63149771e6ed49c037f0d3421bf75b Mon Sep 17 00:00:00 2001 From: Stuart Date: Tue, 19 Mar 2024 14:40:24 -0400 Subject: [PATCH] allow vcat on single ChainedVector Formerly, `vcat(a::ChainedVector)` would fail with an error. --- src/chainedvector.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/chainedvector.jl b/src/chainedvector.jl index c85f4b5..9a404d7 100644 --- a/src/chainedvector.jl +++ b/src/chainedvector.jl @@ -629,6 +629,8 @@ Base.@propagate_inbounds function Base.insert!(A::ChainedVector{T, AT}, i::Integ return A end +Base.vcat(A::ChainedVector{T, AT}) where {T, AT <: AbstractVector{T}} = A + function Base.vcat(A::ChainedVector{T, AT}, arrays::ChainedVector{T, AT}...) where {T, AT <: AbstractVector{T}} newarrays = vcat(A.arrays, map(x->x.arrays, arrays)...) n = length(A.inds)