Skip to content

Commit fa794bf

Browse files
committed
fix blocktype of Diagonal
1 parent cc95ee6 commit fa794bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tensors/diagonal.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ function block(d::DiagonalTensorMap, s::Sector)
111111
end
112112

113113
blocks(t::DiagonalTensorMap) = BlockIterator(t, diagonalblockstructure(space(t)))
114-
blocktype(::Type{TT}) where {TT<:DiagonalTensorMap} = Diagonal{eltype(TT),storagetype(TT)}
114+
function blocktype(::Type{DiagonalTensorMap{T,S,A}}) where {T,S,A}
115+
return Diagonal{T,SubArray{T,1,A,Tuple{UnitRange{Int}},true}}
116+
end
115117

116118
function Base.iterate(iter::BlockIterator{<:DiagonalTensorMap}, state...)
117119
next = iterate(iter.structure, state...)

0 commit comments

Comments
 (0)