Skip to content

Commit

Permalink
Add missing similar
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Nov 15, 2024
1 parent 3489333 commit a8f7ff0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/tensors/abstractblocktensor/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,15 @@ function similar_tensormaptype(
return AbstractTensorMap{scalartype(T),S,numout(P),numin(P)}
end
end
function similar_tensormaptype(
t::AbstractBlockTensorMap, M::Type{<:AbstractVector}, P::TensorMapSumSpace{S}
) where {S}
if isconcretetype(eltype(t))
return tensormaptype(S, numout(P), numin(P), M)
else
return AbstractTensorMap{scalartype(M),S,numout(P),numin(P)}
end
end
function similar_tensormaptype(
t::AbstractBlockTensorMap, T::Type{<:Number}, P::TensorMapSumSpace{S}
) where {S}
Expand Down

0 comments on commit a8f7ff0

Please sign in to comment.