diff test/testLazyTensors.jl @ 411:4aa59af074ef feature/LazyLinearMap/transpose

Add implementation of apply_transpose for LazyLinearMap
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 15 Oct 2020 22:06:54 +0200
parents 3b4b1758a8ad
children 814865d40f48 3796e296fe64 46acb2560451
line wrap: on
line diff
--- a/test/testLazyTensors.jl	Thu Oct 15 21:06:28 2020 +0200
+++ b/test/testLazyTensors.jl	Thu Oct 15 22:06:54 2020 +0200
@@ -219,6 +219,7 @@
     A = rand(3,4)
     Ã = LazyLinearMap(A, (1,), (2,))
     v = rand(4)
+    w = rand(3)
 
     @test à isa LazyLinearMap{T,1,1} where T
     @test à isa TensorMapping{T,1,1} where T
@@ -227,6 +228,7 @@
 
     @test Ã*ones(4) ≈ A*ones(4) atol=5e-13
     @test Ã*v ≈ A*v atol=5e-13
+    @test Ã'*w ≈ A'*w
 
     A = rand(2,3,4)
     @test_throws DomainError LazyLinearMap(A, (3,1), (2,))