Skip to content

Commit f824905

Browse files
committed
verts -> vertices
1 parent 15b9c9d commit f824905

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/abstractitensornetwork.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -937,17 +937,19 @@ end
937937

938938
""" Scale each tensor of the network via a function vertex -> Number"""
939939
function scale!(
940-
weight_function::Function, tn::AbstractITensorNetwork; verts=collect(vertices(tn))
940+
weight_function::Function,
941+
tn::AbstractITensorNetwork;
942+
vertices=collect(Graphs.vertices(tn)),
941943
)
942-
for v in verts
944+
for v in vertices
943945
setindex_preserve_graph!(tn, weight_function(v) * tn[v], v)
944946
end
945947
return tn
946948
end
947949

948950
""" Scale each tensor of the network by a scale factor for each vertex in the keys of the dictionary"""
949951
function scale!(tn::AbstractITensorNetwork, vertices_weights::Dictionary)
950-
return scale!(v -> vertices_weights[v], tn; verts=keys(vertices_weights))
952+
return scale!(v -> vertices_weights[v], tn; vertices=keys(vertices_weights))
951953
end
952954

953955
function scale(weight_function::Function, tn; kwargs...)

0 commit comments

Comments
 (0)