Skip to content

Commit c22b215

Browse files
committed
fix blocksectors to not use isone
1 parent 847c762 commit c22b215

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bimodulesector.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ function TensorKit.blocksectors(W::TensorMapSpace{S,N₁,N₂}) where
278278
for i in 1:size(A4Object)) # have to return all units b/c no info on W in this case
279279
elseif N₁ == 0
280280
@assert N₂ != 0 "one of Type A4Object doesn't exist"
281-
return filter!(isone, collect(blocksectors(dom)))
281+
return filter!(c -> c == leftone(c) == rightone(c), collect(blocksectors(dom)))
282282
elseif N₂ == 0
283283
@assert N₁ != 0 "one of Type A4Object doesn't exist"
284-
return filter!(isone, collect(blocksectors(codom)))
284+
return filter!(c -> c == leftone(c) == rightone(c), collect(blocksectors(codom)))
285285
elseif N₂ <= N₁ # keep intersection
286286
return filter!(c -> hasblock(codom, c), collect(blocksectors(dom)))
287287
else
@@ -291,7 +291,7 @@ end
291291

292292
function dim(V::GradedSpace{<:BimoduleSector})
293293
T = Base.promote_op(*, Int, real(sectorscalartype(sectortype(V))))
294-
return reduce(+, dim(V, c) * dim(c) for c in sectors(V); init=zero(T))
294+
return reduce(+, dim(V, c) * rounddim(c) for c in sectors(V); init=zero(T))
295295
end
296296

297297
# limited oneunit

0 commit comments

Comments
 (0)