Skip to content

Commit

Permalink
small update to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Jan 10, 2025
1 parent 7f40992 commit b804995
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions test/basics/test_svd.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test
using BlockSparseArrays
using BlockSparseArrays: BlockSparseArray, svd, notrunc, truncbelow, truncdim, BlockDiagonal
using BlockSparseArrays: BlockSparseArray, svd, BlockDiagonal
using BlockArrays
using LinearAlgebra: LinearAlgebra, Diagonal, svdvals
using Random
Expand Down Expand Up @@ -58,8 +58,8 @@ test_svd(a, usv)

# blocksparse
# -----------
@testset "($m, $n) BlockDiagonal{$T}" for ((m, n), T) in
Iterators.product(blockszs, eltypes)
@testset "($m, $n) BlockSparseMatrix{$T}" for ((m, n), T) in
Iterators.product(blockszs, eltypes)
a = BlockSparseArray{T}(m, n)
for i in LinearAlgebra.diagind(blocks(a))
I = CartesianIndices(blocks(a))[i]
Expand All @@ -72,12 +72,4 @@ test_svd(a, usv)
usv = svd(a)
# TODO: `BlockDiagonal * Adjoint` errors
test_svd(a, usv)
@test usv.U isa BlockDiagonal
@test usv.Vt isa BlockDiagonal
@test usv.S isa BlockVector

test_svd(a, usv2)
@test usv.U isa BlockDiagonal
@test usv.Vt isa BlockDiagonal
@test usv.S isa BlockVector
end

0 comments on commit b804995

Please sign in to comment.