-
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, blockedrange
using BlockSparseArrays: BlockSparseArray
using MatrixAlgebraKit: svd_trunc
r = blockedrange([2, 2])
a = BlockSparseArray{Float64}(undef, r, r)
a[Block(2, 2)] = randn(2, 2)
u, s, v = svd_trunc(a; trunc=(; atol=1e-3))
s
outputs something like:
2×2-blocked 4×4 BlockSparseMatrix{Float64, Matrix{Float64}, …, …}:
⋅ ⋅ │ ⋅ ⋅
⋅ ⋅ │ ⋅ ⋅
──────────┼───────────────────
⋅ ⋅ │ 1.64506 0.0
⋅ ⋅ │ 0.0 0.359026
If Block(1, 1)
is set instead, the truncation appears to work (i.e. it drops the unallocated block). Also, maxrank
appears to work.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working