Skip to content

Diagonal(BlockVector)[Block(i, i)] is not Diagonal #427

Open
@mtfishman

Description

@mtfishman

For example:

julia> using BlockArrays

julia> d = Diagonal(BlockedVector([1, 2, 3, 4], [2, 2]))
4×4 Diagonal{Int64, BlockedVector{Int64, Vector{Int64}, Tuple{BlockedOneTo{Int64, Vector{Int64}}}}} with indices BlockedOneTo([2, 4])×BlockedOneTo([2, 4]):
 1    
   2  
 ──────┼──────
   3  
     4

julia> d[Block(1, 1)]
2×2 Matrix{Int64}:
 1  0
 0  2

Shows up in #426.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions