FillArrays.jl
FillArrays.jl copied to clipboard
Add hcat, vcat, and cat methods
I recently had a need for these functions. I wrote a quick method (below) for my particular case, but I would be better if they were officially supported.
function Base.hcat(x::Zeros{T,2}...) where T <: Real
all(xx -> xx.size[1] == x[1].size[1], x) || throw(ArgumentError("mismatch in dimension 1"))
n = sum(xx.size[2] for xx in x)
return Zeros(x[1].size[1],n)
end
If you make a PR for this, I'll merge it.