diff test/LazyTensors/lazy_tensor_operations_test.jl @ 1355:102ebdaf7c11 feature/variable_derivatives

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 08 Feb 2023 21:21:28 +0100
parents c94a12327737
children 4c0bc52e170f
line wrap: on
line diff
--- a/test/LazyTensors/lazy_tensor_operations_test.jl	Fri Feb 03 22:50:42 2023 +0100
+++ b/test/LazyTensors/lazy_tensor_operations_test.jl	Wed Feb 08 21:21:28 2023 +0100
@@ -181,6 +181,14 @@
 
     @test (Ã∘B̃*ComplexF64[1.,2.,3.,4.])[1] isa ComplexF64
     @test ((Ã∘B̃)'*ComplexF64[1.,2.])[1] isa ComplexF64
+
+    a = 2.
+    v = rand(3)
+    @test a*Ã isa TensorComposition
+    @test a*Ã == Ã*a
+    @test range_size(a*Ã) == range_size(Ã)
+    @test domain_size(a*Ã) == domain_size(Ã)
+    @test a*Ã*v == a.*A*v
 end