File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -937,17 +937,19 @@ end
937937
938938""" Scale each tensor of the network via a function vertex -> Number"""
939939function 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
946948end
947949
948950""" Scale each tensor of the network by a scale factor for each vertex in the keys of the dictionary"""
949951function 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))
951953end
952954
953955function scale (weight_function:: Function , tn; kwargs... )
You can’t perform that action at this time.
0 commit comments