Subject: | Copy function does not copy graph attributes |
The "copy" function does not copy any attributes associated with the original graph into the duplicate graph. Only the nodes and edges are copied. No mention of this fact appears to be made in the documentation, which states:
copy
$C = $G->copy;
Returns a new graph $C corresponding to the graph $G.
This can lead to unexpected behavior when you try to copy graphs with attributes.