diff --git a/Project.toml b/Project.toml index acc4379..6b886cd 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "BlockSparseArrays" uuid = "2c9a651f-6452-4ace-a6ac-809f4280fbb4" authors = ["ITensor developers and contributors"] -version = "0.10.8" +version = "0.10.9" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/test/Project.toml b/test/Project.toml index ba11df9..2a8bc6e 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -29,7 +29,7 @@ BlockSparseArrays = "0.10" DerivableInterfaces = "0.5" DiagonalArrays = "0.3" GPUArraysCore = "0.2" -JLArrays = "0.2" +JLArrays = "0.2, 0.3" LinearAlgebra = "1" MatrixAlgebraKit = "0.5" Random = "1" diff --git a/test/test_basics.jl b/test/test_basics.jl index 7e897a0..9fd4720 100644 --- a/test/test_basics.jl +++ b/test/test_basics.jl @@ -286,7 +286,9 @@ arrayts = (Array, JLArray) for p in 1:3 @test norm(a, p) ≈ norm(Array(a), p) end - @test tr(a) ≈ tr(Array(a)) + # We use `@allowscalar` here since there seems to be a regression + # in `tr` of GPU arrays for that operation. + @test @allowscalar(tr(a)) ≈ tr(Array(a)) # Empty constructor for a in (dev(BlockSparseArray{elt}(undef)),) diff --git a/test/test_factorizations.jl b/test/test_factorizations.jl index 9446bf5..a9188c2 100644 --- a/test/test_factorizations.jl +++ b/test/test_factorizations.jl @@ -86,7 +86,8 @@ using Test: @inferred, @test, @test_throws, @testset MATRIX_FUNCTIONS = BlockSparseArrays.MATRIX_FUNCTIONS # These functions involve inverses so they break when there are zeros on the diagonal. MATRIX_FUNCTIONS_SINGULAR = [ - :log, :acsc, :asec, :acot, :acsch, :asech, :acoth, :csc, :cot, :csch, :coth, + :log, :acsc, :asec, :acosh, :acot, :acsch, :asech, :acoth, :csc, :cot, :csch, + :coth, ] MATRIX_FUNCTIONS = setdiff(MATRIX_FUNCTIONS, MATRIX_FUNCTIONS_SINGULAR) # Dense version is broken for some reason, investigate. @@ -100,15 +101,9 @@ using Test: @inferred, @test, @test_throws, @testset end end - SINGULAR_EXCEPTION = if VERSION < v"1.11-" - # A different exception is thrown in older versions of Julia. - LinearAlgebra.LAPACKException - else - LinearAlgebra.SingularException - end - for f in setdiff(MATRIX_FUNCTIONS_SINGULAR, [:log]) + for f in setdiff(MATRIX_FUNCTIONS_SINGULAR, [:acosh, :log]) @eval begin - @test_throws $SINGULAR_EXCEPTION $f($a) + @test_throws Exception $f($a) end end end