Skip to content

Commit cb734d2

Browse files
committed
actually twist correct tensor...
1 parent 8eaf445 commit cb734d2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎src/tensors/indexmanipulations.jl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ See [`twist!`](@ref) for storing the result in place.
295295
function twist(t::AbstractTensorMap, inds; inv::Bool = false, copy::Bool = false)
296296
!copy && has_shared_twist(t, inds) && return t
297297
tdst = TO.tensoralloc_add(scalartype(t), t, (codomainind(t), domainind(t)), false, Val(false))
298+
copy!(tdst, t)
298299
return twist!(tdst, inds; inv)
299300
end
300301

0 commit comments

Comments
 (0)