-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
For example:
using BlockArrays: Block
using BlockSparseArrays: BlockSparseMatrix
a = BlockSparseMatrix{Float64}(undef, [2, 3], [2, 3])
a[Block(1, 1)] = randn(2, 2)
a[Block(2, 2)] = randn(3, 3)
julia> a
2×2-blocked 5×5 BlockSparseMatrix{Float64, Matrix{Float64}, …, …}:
-1.10318 0.582626 │ ⋅ ⋅ ⋅
-1.04284 -2.18239 │ ⋅ ⋅ ⋅
─────────────────────┼──────────────────────────────────
⋅ ⋅ │ -0.349282 -0.208514 -0.628124
⋅ ⋅ │ -2.15969 2.31498 -0.730257
⋅ ⋅ │ 0.390346 1.51636 -0.0331465
julia> a'a
2×2-blocked 5×5 BlockSparseMatrix{Float64, Matrix{Float64}, …, …}:
2.30452 1.63314 │ 0.0 0.0 0.0
1.63314 5.10226 │ 0.0 0.0 0.0
──────────────────┼───────────────────────────────
0.0 0.0 │ 4.93862 -4.3349 1.78358
0.0 0.0 │ -4.3349 7.70197 -1.60982
0.0 0.0 │ 1.78358 -1.60982 0.928913
julia> a * a
2×2-blocked 5×5 BlockSparseMatrix{Float64, Matrix{Float64}, …, …}:
0.609417 -1.91426 │ ⋅ ⋅ ⋅
3.42632 4.15522 │ ⋅ ⋅ ⋅
────────────────────┼────────────────────────────────
⋅ ⋅ │ 0.327139 -1.36234 0.392481
⋅ ⋅ │ -4.53035 4.70213 -0.309774
⋅ ⋅ │ -3.42415 3.37869 -1.35142
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working