Skip to content

Commit ba73109

Browse files
committed
Fix issue with kwarg interpreted as iterator
1 parent f96b290 commit ba73109

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

src/spaces/gradedspace.jl

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,23 +168,19 @@ function fuse(V₁::GradedSpace{I}, V₂::GradedSpace{I}) where {I<:Sector}
168168
end
169169

170170
function infimum(V₁::GradedSpace{I}, V₂::GradedSpace{I}) where {I<:Sector}
171-
if V₁.dual == V₂.dual
172-
typeof(V₁)(c => min(dim(V₁, c), dim(V₂, c))
173-
for c in
174-
union(sectors(V₁), sectors(V₂)), dual in V₁.dual)
175-
else
171+
Visdual = isdual(V₁)
172+
Visdual == isdual(V₂) ||
176173
throw(SpaceMismatch("Infimum of space and dual space does not exist"))
177-
end
174+
return typeof(V₁)((Visdual ? dual(c) : c) => min(dim(V₁, c), dim(V₂, c))
175+
for c in intersect(sectors(V₁), sectors(V₂)); dual=Visdual)
178176
end
179177

180178
function supremum(V₁::GradedSpace{I}, V₂::GradedSpace{I}) where {I<:Sector}
181-
if V₁.dual == V₂.dual
182-
typeof(V₁)(c => max(dim(V₁, c), dim(V₂, c))
183-
for c in
184-
union(sectors(V₁), sectors(V₂)), dual in V₁.dual)
185-
else
179+
Visdual = isdual(V₁)
180+
Visdual == isdual(V₂) ||
186181
throw(SpaceMismatch("Supremum of space and dual space does not exist"))
187-
end
182+
return typeof(V₁)((Visdual ? dual(c) : c) => max(dim(V₁, c), dim(V₂, c))
183+
for c in union(sectors(V₁), sectors(V₂)); dual=Visdual)
188184
end
189185

190186
function Base.show(io::IO, V::GradedSpace{I}) where {I<:Sector}

0 commit comments

Comments
 (0)