diff test/LazyTensors/lazy_tensor_operations_test.jl @ 1086:74c54996de6a

Merge feature/scalar_times_tensor
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Sun, 08 May 2022 11:35:22 +0200
parents 2e606d4c0ab1
children 2278730f9cee 1e8270c18edb 97dfca9ec054
line wrap: on
line diff
--- a/test/LazyTensors/lazy_tensor_operations_test.jl	Fri Apr 08 19:36:22 2022 +0200
+++ b/test/LazyTensors/lazy_tensor_operations_test.jl	Sun May 08 11:35:22 2022 +0200
@@ -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