JuliaArrays / JuliaArrays/BlockArrays.jl

Add `blockvcat`, `blockhcat`, and `blockhvcat`

Open
#150 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
254
Forks
39
PR merge metrics
No merged PRs in 30d

Description

We should add blockvcat(A,B,...) that produces a blocked array. For example blockvcat(1:5,10:12)[Block(1)] == 1:5. But also supporting the case whereA and B are blocked, where the block structure is concatenated. An initial prototype is here

https://github.com/JuliaMatrices/LazyBandedMatrices.jl/blob/master/src/blockconcat.jl

Following blockkron we first produce lazy versions. We may also want to add a macro, something like:

@blocked [A; B] # lowers to blockvcat(A,B)
@blocked [A B] # lowers to blockhcat(A,B)
@blocked [A B; C D] # lowers toblockhvcat(2, A, B, C, D)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the prototype in src/blockconcat.jl and compare its approach with blockkron. Define the lazy blockvcat, blockhcat, and blockhvcat behavior for ordinary and blocked inputs, then assess the proposed @blocked macro; the work is done when these concatenation forms preserve the requested block structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.