Skip to content

Commit

Permalink
Check duality of axes after adjoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Nov 9, 2024
1 parent cce9743 commit 551e494
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@eval module $(gensym())
using Compat: Returns
using Test: @test, @testset
using BlockArrays:
AbstractBlockArray, Block, BlockedOneTo, blockedrange, blocklengths, blocksize
Expand Down Expand Up @@ -287,6 +286,15 @@ const elts = (Float32, Float64, Complex{Float32}, Complex{Float64})
@test ax isa typeof(dual(r))
end

@test !isdual(axes(a, 1))
@test !isdual(axes(a, 2))
@test isdual(axes(a', 1))
@test isdual(axes(a', 2))
@test isdual(axes(b, 1))
@test isdual(axes(b, 2))
@test isdual(axes(copy(a'), 1))
@test isdual(axes(copy(a'), 2))

I = [Block(1)[1:1]]
@test size(b[I, :]) == (1, 4)
@test size(b[:, I]) == (4, 1)
Expand Down

0 comments on commit 551e494

Please sign in to comment.