From 551e4942971058142405132fd051502418822544 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Sat, 9 Nov 2024 10:37:29 -0500 Subject: [PATCH] Check duality of axes after adjoint --- .../BlockSparseArraysGradedAxesExt/test/runtests.jl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test/runtests.jl b/NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test/runtests.jl index 41f7fc3478..11c40d10dc 100644 --- a/NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test/runtests.jl +++ b/NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test/runtests.jl @@ -1,5 +1,4 @@ @eval module $(gensym()) -using Compat: Returns using Test: @test, @testset using BlockArrays: AbstractBlockArray, Block, BlockedOneTo, blockedrange, blocklengths, blocksize @@ -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)