Skip to content

Check axes not size? #9

@mcabbott

Description

@mcabbott

Perhaps the first of these should be an error:

julia> stack(OffsetArray(fill(i,5), rand(-2:2)) for i in 1:10)
5×10 OffsetArray(::Array{Int64,2}, 0:4, 1:10) with eltype Int64 with indices 0:4×1:10:
 1  2  3  4  5  6  7  8  9  10
 1  2  3  4  5  6  7  8  9  10
 1  2  3  4  5  6  7  8  9  10
 1  2  3  4  5  6  7  8  9  10
 1  2  3  4  5  6  7  8  9  10

julia> rstack(OffsetArray(fill(i,5), rand(-2:2)) for i in 1:10)
9×10 OffsetArray(::Array{Int64,2}, -1:7, 1:10) with eltype Int64 with indices -1:7×1:10:
 1  0  0  4  0  6  7  8  0   0
 1  0  0  4  5  6  7  8  0  10
 1  0  0  4  5  6  7  8  0  10
 1  2  0  4  5  6  7  8  9  10
 1  2  3  4  5  6  7  8  9  10
 0  2  3  0  5  0  0  0  9  10
 0  2  3  0  0  0  0  0  9   0
 0  2  3  0  0  0  0  0  9   0
 0  0  3  0  0  0  0  0  0   0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions