Skip to content

Commit 1717210

Browse files
committed
add missing similar definition
1 parent c46d4fe commit 1717210

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/tensors/sectorvector.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Base.size(v::SectorVector, args...) = size(parent(v), args...)
3737
Base.similar(v::SectorVector) = SectorVector(similar(v.data), v.structure)
3838
Base.similar(v::SectorVector, ::Type{T}) where {T} = SectorVector(similar(v.data, T), v.structure)
3939
Base.similar(v::SectorVector, V::ElementarySpace) = SectorVector{eltype(v), sectortype(V), storagetype(v)}(undef, V)
40+
Base.similar(v::SectorVector, ::Type{T}, V::ElementarySpace) where {T} = SectorVector(similar(v.data, T, reduceddim(V)), V)
4041

4142
Base.copy(v::SectorVector) = SectorVector(copy(v.data), v.structure)
4243

0 commit comments

Comments
 (0)