diff options
author | Dan Schult <dschult@colgate.edu> | 2017-08-12 06:51:34 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-12 06:51:34 -0600 |
commit | beec684828243464c40799545919d3741dde460d (patch) | |
tree | aaec837f9c034d87de497c9e4f77dbab2a9971c8 /networkx/relabel.py | |
parent | 5632ed99217287f2f245e72504384b9f246a104e (diff) | |
download | networkx-beec684828243464c40799545919d3741dde460d.tar.gz |
Next attempt to meld graphviews with base classes (#2593)
* Update code to prepare for melding graphviews
* Meld graphviews into graph classes
* Cleanup subgraph calling sign. and remove duplicate code
* Add some tests for raising exceptions
* update edge_kcomponents to avoid readonly views.
* Add root_graph attribute and tests
Update tests for root_graph as well as fresh_copy.
I left fresh_copy as an attribute even with root_graph
because a view might switch the data structure of the
view from directed to undirected. Going to the root_graph.__class__
may not give you what you need to create a graph like the view.
Fresh_copy gives a null graph with the directed/multi type of that
view or graph.
Diffstat (limited to 'networkx/relabel.py')
-rw-r--r-- | networkx/relabel.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networkx/relabel.py b/networkx/relabel.py index 8c2abafa..e7124325 100644 --- a/networkx/relabel.py +++ b/networkx/relabel.py @@ -165,7 +165,7 @@ def _relabel_copy(G, mapping): H.add_edges_from((mapping.get(n1, n1), mapping.get(n2, n2), d.copy()) for (n1, n2, d) in G.edges(data=True)) - H.graph.update(G.graph.copy()) + H.graph.update(G.graph) return H |