Skip to content

Commit c754d35

Browse files
committed
remove unneeded similar
1 parent 7ecea43 commit c754d35

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/fusiontensor/base_interface.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ end
8282

8383
Base.permutedims(ft::FusionTensor, args...) = fusiontensor_permutedims(ft, args...)
8484

85-
Base.similar(ft::FusionTensor) = similar(ft, eltype(ft))
8685
function Base.similar(ft::FusionTensor, T::Type)
8786
# reuse trees_block_mapping
8887

test/basics/test_basics.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ include("setup.jl")
9191
@test eltype(ft5) == ComplexF64
9292
@test checkaxes(codomain_axes(ft5), (g1, g1))
9393
@test checkaxes(domain_axes(ft5), (g2,))
94+
95+
ft5 = similar(ft1, ComplexF32, tuplemortar(((g1, g1), (g2,))))
96+
@test isnothing(check_sanity(ft5))
97+
@test eltype(ft5) == ComplexF64
98+
@test checkaxes(codomain_axes(ft5), (g1, g1))
99+
@test checkaxes(domain_axes(ft5), (g2,))
94100
end
95101

96102
@testset "More than 2 axes" begin

0 commit comments

Comments
 (0)