Skip to content

Commit 3959823

Browse files
committed
guard against empty blocks
1 parent 5489eb7 commit 3959823

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/tensors/abstractblocktensor/abstracttensormap.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ end
3434
t::AbstractBlockTensorMap, v::AbstractBlockArray, f₁::FusionTree, f₂::FusionTree
3535
)
3636
for I in eachindex(t)
37-
getindex!(t, I)[f₁, f₂] = v[Block(I.I)]
37+
b = v[Block(I.I)]
38+
if !isempty(b)
39+
getindex!(t, I)[f₁, f₂] = v[Block(I.I)]
40+
end
3841
end
3942
return t
4043
end

0 commit comments

Comments
 (0)