Skip to content

Commit 99413d9

Browse files
github-actions[bot]CompatHelper Juliamtfishman
authored
CompatHelper: bump compat for JLArrays to 0.3 for package test, (keep existing compat) (#183)
Co-authored-by: CompatHelper Julia <[email protected]> Co-authored-by: Matt Fishman <[email protected]> Co-authored-by: mtfishman <[email protected]>
1 parent f2a8bc6 commit 99413d9

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "BlockSparseArrays"
22
uuid = "2c9a651f-6452-4ace-a6ac-809f4280fbb4"
33
authors = ["ITensor developers <[email protected]> and contributors"]
4-
version = "0.10.8"
4+
version = "0.10.9"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ BlockSparseArrays = "0.10"
2929
DerivableInterfaces = "0.5"
3030
DiagonalArrays = "0.3"
3131
GPUArraysCore = "0.2"
32-
JLArrays = "0.2"
32+
JLArrays = "0.2, 0.3"
3333
LinearAlgebra = "1"
3434
MatrixAlgebraKit = "0.5"
3535
Random = "1"

test/test_basics.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ arrayts = (Array, JLArray)
286286
for p in 1:3
287287
@test norm(a, p) norm(Array(a), p)
288288
end
289-
@test tr(a) tr(Array(a))
289+
# We use `@allowscalar` here since there seems to be a regression
290+
# in `tr` of GPU arrays for that operation.
291+
@test @allowscalar(tr(a)) tr(Array(a))
290292

291293
# Empty constructor
292294
for a in (dev(BlockSparseArray{elt}(undef)),)

test/test_factorizations.jl

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ using Test: @inferred, @test, @test_throws, @testset
8686
MATRIX_FUNCTIONS = BlockSparseArrays.MATRIX_FUNCTIONS
8787
# These functions involve inverses so they break when there are zeros on the diagonal.
8888
MATRIX_FUNCTIONS_SINGULAR = [
89-
:log, :acsc, :asec, :acot, :acsch, :asech, :acoth, :csc, :cot, :csch, :coth,
89+
:log, :acsc, :asec, :acosh, :acot, :acsch, :asech, :acoth, :csc, :cot, :csch,
90+
:coth,
9091
]
9192
MATRIX_FUNCTIONS = setdiff(MATRIX_FUNCTIONS, MATRIX_FUNCTIONS_SINGULAR)
9293
# Dense version is broken for some reason, investigate.
@@ -100,15 +101,9 @@ using Test: @inferred, @test, @test_throws, @testset
100101
end
101102
end
102103

103-
SINGULAR_EXCEPTION = if VERSION < v"1.11-"
104-
# A different exception is thrown in older versions of Julia.
105-
LinearAlgebra.LAPACKException
106-
else
107-
LinearAlgebra.SingularException
108-
end
109-
for f in setdiff(MATRIX_FUNCTIONS_SINGULAR, [:log])
104+
for f in setdiff(MATRIX_FUNCTIONS_SINGULAR, [:acosh, :log])
110105
@eval begin
111-
@test_throws $SINGULAR_EXCEPTION $f($a)
106+
@test_throws Exception $f($a)
112107
end
113108
end
114109
end

0 commit comments

Comments
 (0)