Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BlockSparseArrays"
uuid = "2c9a651f-6452-4ace-a6ac-809f4280fbb4"
authors = ["ITensor developers <support@itensor.org> and contributors"]
version = "0.10.8"
version = "0.10.9"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion test/test_basics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)),)
Expand Down
13 changes: 4 additions & 9 deletions test/test_factorizations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
Loading