Skip to content

Commit 551e494

Browse files
committed
Check duality of axes after adjoint
1 parent cce9743 commit 551e494

File tree

1 file changed

+9
-1
lines changed
  • NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test

1 file changed

+9
-1
lines changed

NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test/runtests.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@eval module $(gensym())
2-
using Compat: Returns
32
using Test: @test, @testset
43
using BlockArrays:
54
AbstractBlockArray, Block, BlockedOneTo, blockedrange, blocklengths, blocksize
@@ -287,6 +286,15 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64})
287286
@test ax isa typeof(dual(r))
288287
end
289288

289+
@test !isdual(axes(a, 1))
290+
@test !isdual(axes(a, 2))
291+
@test isdual(axes(a', 1))
292+
@test isdual(axes(a', 2))
293+
@test isdual(axes(b, 1))
294+
@test isdual(axes(b, 2))
295+
@test isdual(axes(copy(a'), 1))
296+
@test isdual(axes(copy(a'), 2))
297+
290298
I = [Block(1)[1:1]]
291299
@test size(b[I, :]) == (1, 4)
292300
@test size(b[:, I]) == (4, 1)

0 commit comments

Comments
 (0)