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 = "TensorAlgebra"
uuid = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a"
authors = ["ITensor developers <[email protected]> and contributors"]
version = "0.3.2"
version = "0.3.3"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TestExtras = "5ed8adda-3752-4e41-b88a-e8b09835ee3a"

[compat]
Aqua = "0.8.9"
BlockArrays = "1.4.0"
BlockArrays = "1.6.1"
EllipsisNotation = "1.8.0"
LinearAlgebra = "<0.0.1, 1"
MatrixAlgebraKit = "0.1"
Expand Down
10 changes: 6 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ const GROUP = uppercase(
)

"match files of the form `test_*.jl`, but exclude `*setup*.jl`"
istestfile(fn) =
endswith(fn, ".jl") && startswith(basename(fn), "test_") && !contains(fn, "setup")
function istestfile(fn)
return endswith(fn, ".jl") && startswith(basename(fn), "test_") && !contains(fn, "setup")
end
"match files of the form `*.jl`, but exclude `*_notest.jl` and `*setup*.jl`"
isexamplefile(fn) =
endswith(fn, ".jl") && !endswith(fn, "_notest.jl") && !contains(fn, "setup")
function isexamplefile(fn)
return endswith(fn, ".jl") && !endswith(fn, "_notest.jl") && !contains(fn, "setup")
end

@time begin
# tests in groups based on folder structure
Expand Down
10 changes: 4 additions & 6 deletions test/test_blockarrays_contract.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using Random: randn!
using Test: @test, @test_broken, @testset

using BlockArrays: Block, BlockArray, BlockedArray, blockedrange, blocksize

using Random: randn!
using TensorAlgebra: contract
using Test: @test, @testset

function randn_blockdiagonal(elt::Type, axes::Tuple)
a = zeros(elt, axes)
Expand Down Expand Up @@ -57,7 +55,7 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64})
a_dest_dense, dimnames_dest_dense = contract(a3_dense, (1, 2), a3_dense, (2, 1))
@test dimnames_dest == dimnames_dest_dense
@test size(a_dest) == size(a_dest_dense)
@test_broken a_dest isa BlockedArray{elt,0}
@test a_dest isa BlockedArray{elt,0}
@test a_dest ≈ a_dest_dense

# outer product
Expand Down Expand Up @@ -103,7 +101,7 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64})
a_dest, dimnames_dest = contract(a3, (1, 2), a3, (2, 1))
@test dimnames_dest == dimnames_dest_dense
@test size(a_dest) == size(a_dest_dense)
@test_broken a_dest isa BlockArray{elt,0}
@test a_dest isa BlockArray{elt,0}
@test a_dest ≈ a_dest_dense

# outer product
Expand Down
Loading