Skip to content

Commit

Permalink
Add dropdims to newly added tensors
Browse files Browse the repository at this point in the history
  • Loading branch information
jofrevalles committed Jul 4, 2023
1 parent 71f28a4 commit c564093
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ OMEinsum = "0.7"
Permutations = "0.4"
Quac = "0.2"
Requires = "1.3"
Tensors = "0.1.4"
Tensors = "0.1.9"
ValSplit = "0.1"
julia = "1.8"
4 changes: 2 additions & 2 deletions src/Transformations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ function transform!(tn::TensorNetwork, config::SplitSimplification)
tensor_r = v

pop!(tn, tensor) # Remove the old tensor
push!(tn, tensor_l) # Add the new tensors
push!(tn, tensor_r)
push!(tn, dropdims(tensor_l, dims = tuple(findall(size(tensor_l) .== 1)...))) # Add the new tensors
push!(tn, dropdims(tensor_r, dims = tuple(findall(size(tensor_r) .== 1)...)))

done = false # A change was made, so we'll need to go another pass
break # Exit the inner loop early
Expand Down

0 comments on commit c564093

Please sign in to comment.