Skip to content

Commit bfc594a

Browse files
committed
change @Assert
1 parent b431b32 commit bfc594a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/factorizations/svd.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ struct BlockPermutedDiagonalAlgorithm{A<:MatrixAlgebraKit.AbstractAlgorithm} <:
1111
alg::A
1212
end
1313

14+
# TODO: this is a hardcoded for now to get around this function not being defined in the
15+
# type domain
1416
function MatrixAlgebraKit.default_svd_algorithm(A::AbstractBlockSparseMatrix; kwargs...)
15-
@assert blocktype(A) <: StridedMatrix{<:LinearAlgebra.BLAS.BlasFloat} "unsupported type:
16-
$(blocktype(A))"
17+
blocktype(A) <: StridedMatrix{<:LinearAlgebra.BLAS.BlasFloat} ||
18+
error("unsupported type: $(blocktype(A))")
1719
alg = MatrixAlgebraKit.LAPACK_DivideAndConquer(; kwargs...)
1820
return BlockPermutedDiagonalAlgorithm(alg)
1921
end

0 commit comments

Comments
 (0)