We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bc18db commit 8aed2d9Copy full SHA for 8aed2d9
src/tensornetwork.jl
@@ -66,8 +66,7 @@ end
66
tensornetwork_edges(tensors) = tensornetwork_edges(NamedEdge, tensors)
67
68
function TensorNetwork(f::Base.Callable, graph::AbstractGraph)
69
- tensors = Dictionary(vertices(graph), f.(vertices(graph)))
70
- return TensorNetwork(graph, tensors)
+ return TensorNetwork(graph, Dictionary(map(f, vertices(graph))))
71
end
72
function TensorNetwork(graph::AbstractGraph, tensors)
73
tn = _TensorNetwork(graph, tensors)
0 commit comments