We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86564ed commit 6b03e26Copy full SHA for 6b03e26
1 file changed
test/tensors.jl
@@ -739,6 +739,18 @@ for V in spacelist
739
@test t ≈ t′
740
end
741
742
+ @timedtestset "Tensor embedding" begin
743
+ t1 = rand(V1 ⊕ V1, V2 ⊗ V3)
744
+ t2 = rand(V1, V2 ⊗ V3)
745
+
746
+ # embedding small into large
747
+ t3 = @constinferred embed!(zerovector(t1), t2)
748
+ @test norm(t3) ≈ norm(t2)
749
750
+ # embedding large into small
751
+ t4 = @constinferred embed!(zerovector(t2), t1)
752
+ @test norm(t4) < norm(t1)
753
+ end
754
755
TensorKit.empty_globalcaches!()
756
0 commit comments