Skip to content

Edge cases for empty ProductSpaces #102

Closed
@lkdvos

Description

@lkdvos

The following throws an error:

julia> blockdim(ComplexSpace(2), Trivial())
2

julia> blockdim(one(ComplexSpace(2)), Trivial())
ERROR: MethodError: no method matching fusiontrees(::Tuple{}, ::Trivial)

Closest candidates are:
  fusiontrees(::Tuple{Vararg{I, N}}, ::I, ::Tuple{Vararg{Bool, N}}) where {N, I<:Sector}
   @ TensorKit ~/Projects/People/Sylvain/dev/TensorKit/src/fusiontrees/iterator.jl:4
  fusiontrees(::Tuple{I, Vararg{I}}, ::I) where I<:Sector
   @ TensorKit ~/Projects/People/Sylvain/dev/TensorKit/src/fusiontrees/iterator.jl:8

Stacktrace:
 [1] blockdim(P::ProductSpace{ComplexSpace, 0}, c::Trivial)
   @ TensorKit ~/Projects/People/Sylvain/dev/TensorKit/src/spaces/productspace.jl:182

Similar results for graded spaces etc. It seems like this was introduced in 9ad2804, and is fixed by just replacing Tuple{I,Vararg{I}} with Tuple{Vararg{I}} in this line. I think this got introduced because Aqua was complaining?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions