Skip to content

Commit cc95ee6

Browse files
committed
sort blocksectors of ProductSpace
1 parent bdcc53a commit cc95ee6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/spaces/homspace.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,11 @@ function blocksectors(W::HomSpace)
8888
N₁ = length(codom)
8989
N₂ = length(dom)
9090
I = sectortype(W)
91-
if N₁ == 0 || N₂ == 0
92-
return (one(I),)
93-
elseif N₂ <= N₁
94-
return sort!(filter!(c -> hasblock(codom, c), collect(blocksectors(dom))))
91+
# TODO: is sort! still necessary now that blocksectors of ProductSpace is sorted?
92+
if N₂ <= N₁
93+
return sort!(filter!(c -> hasblock(codom, c), blocksectors(dom)))
9594
else
96-
return sort!(filter!(c -> hasblock(dom, c), collect(blocksectors(codom))))
95+
return sort!(filter!(c -> hasblock(dom, c), blocksectors(codom)))
9796
end
9897
end
9998

src/spaces/productspace.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function blocksectors(P::ProductSpace{S,N}) where {S,N}
162162
end
163163
end
164164
end
165-
return bs
165+
return sort!(bs)
166166
end
167167

168168
"""

0 commit comments

Comments
 (0)