Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hcat, vcat, and cat methods #23

Open
lstagner opened this issue Jul 11, 2018 · 1 comment · May be fixed by #140
Open

Add hcat, vcat, and cat methods #23

lstagner opened this issue Jul 11, 2018 · 1 comment · May be fixed by #140

Comments

@lstagner
Copy link

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
@dlfivefifty
Copy link
Member

If you make a PR for this, I'll merge it.

@DrChainsaw DrChainsaw linked a pull request Feb 21, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants