comparison test/LazyTensors/lazy_tensor_operations_test.jl @ 1365:4684c7f1c4cb feature/variable_derivatives

Merge with default
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Sun, 21 May 2023 21:55:14 +0200
parents 4c0bc52e170f
children fddd3a906535
comparison
equal deleted inserted replaced
1358:e7861cfb6ede 1365:4684c7f1c4cb
186 v = rand(3) 186 v = rand(3)
187 @test a*Ã isa TensorComposition 187 @test a*Ã isa TensorComposition
188 @test a*Ã == Ã*a 188 @test a*Ã == Ã*a
189 @test range_size(a*Ã) == range_size(Ã) 189 @test range_size(a*Ã) == range_size(Ã)
190 @test domain_size(a*Ã) == domain_size(Ã) 190 @test domain_size(a*Ã) == domain_size(Ã)
191 @test a*Ã*v == a.*A*v 191 @test a*Ã*v ≈ a.*A*v rtol=1e-14
192 end 192 end
193 193
194 194
195 @testset "InflatedTensor" begin 195 @testset "InflatedTensor" begin
196 I(sz...) = IdentityTensor(sz...) 196 I(sz...) = IdentityTensor(sz...)