Skip to content

Commit e4a5566

Browse files
committed
Restore line that needs to be fixed in Strided
1 parent ccff5b8 commit e4a5566

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/tensors/abstractblocktensor/conversion.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Conversion
22
# ----------
3-
43
function Base.convert(::Type{TensorMap}, t::AbstractBlockTensorMap)
54
S = spacetype(t)
65
N₁, N₂ = numout(t), numin(t)
@@ -23,9 +22,7 @@ function Base.convert(::Type{TensorMap}, t::AbstractBlockTensorMap)
2322
indices = getindex.(blockax, Block.(Tuple(k)))
2423
arr_slice = arr[indices...]
2524
# need to check for empty since fusion tree pair might not be present
26-
if !isempty(arr_slice)
27-
arr[indices...] .= v[f₁, f₂]
28-
end
25+
isempty(arr_slice) || copy!(arr_slice, v[f₁, f₂])
2926
end
3027
end
3128

0 commit comments

Comments
 (0)