Skip to content

Commit 43cb3e3

Browse files
committed
Add check diagonal
1 parent 0365612 commit 43cb3e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/spaces/homspace.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,8 @@ end
354354
#----------------
355355
# TODO: is this something we want to cache?
356356
function diagonalblockstructure(W::HomSpace)
357+
((numin(W) == numout(W) == 1) && domain(W) == codomain(W)) ||
358+
throw(ArgumentError("Input space is not diagonal"))
357359
structure = SectorDict{sectortype(W),UnitRange{Int}}() # range
358360
offset = 0
359361
dom = domain(W)[1]

0 commit comments

Comments
 (0)