@@ -38,13 +38,13 @@ include("setup.jl")
3838 g2 = dual (gradedrange ([U1 (0 ) => 2 , U1 (1 ) => 2 , U1 (3 ) => 1 ]))
3939
4040 fta = FusionTensorAxes ((g1,), (g2,))
41- ft0 = FusionTensor ( Float64, fta)
41+ ft0 = FusionTensor { Float64} (undef , fta)
4242 @test ft0 isa FusionTensor
4343 @test space_isequal (codomain_axis (ft0), g1)
4444 @test space_isequal (domain_axis (ft0), g2)
4545
4646 # check dual convention when initializing data_matrix
47- ft0 = FusionTensor ( Float64, (g1,), (g2,))
47+ ft0 = FusionTensor { Float64} (undef , (g1,), (g2,))
4848 @test ft0 isa FusionTensor
4949 @test space_isequal (codomain_axis (ft0), g1)
5050 @test space_isequal (domain_axis (ft0), g2)
154154 g1 = gradedrange ([U1 (0 ) => 1 , U1 (1 ) => 2 , U1 (2 ) => 3 ])
155155
156156 # one row axis
157- ft1 = FusionTensor ( Float64, (g1,), ())
157+ ft1 = FusionTensor { Float64} (undef , (g1,), ())
158158 @test ndims_codomain (ft1) == 1
159159 @test ndims_domain (ft1) == 0
160160 @test ndims (ft1) == 1
164164 @test sector_type (ft1) === sector_type (g1)
165165
166166 # one column axis
167- ft2 = FusionTensor ( Float64, (), (g1,))
167+ ft2 = FusionTensor { Float64} (undef , (), (g1,))
168168 @test ndims_codomain (ft2) == 0
169169 @test ndims_domain (ft2) == 1
170170 @test ndims (ft2) == 1
174174 @test sector_type (ft2) === sector_type (g1)
175175
176176 # zero axis
177- ft3 = FusionTensor ( Float64, (), ())
177+ ft3 = FusionTensor { Float64} (undef , (), ())
178178 @test ndims_codomain (ft3) == 0
179179 @test ndims_domain (ft3) == 0
180180 @test ndims (ft3) == 0
189189 g2 = gradedrange ([U1 (0 ) => 2 , U1 (1 ) => 2 , U1 (3 ) => 1 ])
190190 g3 = gradedrange ([U1 (- 1 ) => 1 , U1 (0 ) => 2 , U1 (1 ) => 1 ])
191191 g4 = gradedrange ([U1 (- 1 ) => 1 , U1 (0 ) => 1 , U1 (1 ) => 1 ])
192- ft3 = FusionTensor ( Float64, (g1, g2), (g3, g4))
192+ ft3 = FusionTensor { Float64} (undef , (g1, g2), (g3, g4))
193193 @test isnothing (check_sanity (ft3))
194194
195195 ft4 = + ft3
268268 @test space_isequal (dual (g4), codomain_axes (ad)[2 ])
269269 @test isnothing (check_sanity (ad))
270270
271- ft7 = FusionTensor ( Float64, (g1,), (g2, g3, g4))
271+ ft7 = FusionTensor { Float64} (undef , (g1,), (g2, g3, g4))
272272 @test_throws DimensionMismatch ft7 + ft3
273273 @test_throws DimensionMismatch ft7 - ft3
274274 @test_throws DimensionMismatch ft7 * ft3
309309 m = data_matrix (ft2)[Block (i, i)]
310310 @test m == 3 * LinearAlgebra. I (size (m, 1 ))
311311 end
312+
313+ @test FusionTensor {ComplexF64} (LinearAlgebra. I, (g1, g2)) isa FusionTensor{ComplexF64,4 }
312314end
313315
314316@testset " missing SectorProduct" begin
317319 g3 = gradedrange ([SectorProduct (U1 (1 ), SU2 (1 // 2 ), Z {2} (1 )) => 1 ])
318320 S = sector_type (g3)
319321
320- ft = FusionTensor ( Float64, (g1,), (dual (g2), dual (g3)))
322+ ft = FusionTensor { Float64} (undef , (g1,), (dual (g2), dual (g3)))
321323 @test sector_type (ft) === S
322324 gr = gradedrange ([SectorProduct (U1 (1 ), SU2 (0 ), Z {2} (0 )) => 1 ])
323325 @test space_isequal (codomain_axis (ft), gr)
332334 gABC = tensor_product (gA, gB, gC)
333335 S = sector_type (gABC)
334336
335- ft = FusionTensor ( Float64, (gA, gB), (dual (gA), dual (gB), gC))
337+ ft = FusionTensor { Float64} (undef , (gA, gB), (dual (gA), dual (gB), gC))
336338 @test sector_type (ft) === S
337339 @test space_isequal (codomain_axis (ft), gABC)
338340 @test space_isequal (domain_axis (ft), dual (gABC))
0 commit comments