#8329: Missing copy() method in BipartiteGraph
----------------------------+-----------------------------------------------
Reporter: rhinton | Owner: rhinton
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.3.4
Component: graph theory | Keywords: BipartiteGraph, copy
Author: Ryan Hinton | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
----------------------------+-----------------------------------------------
Comment(by rlm):
This patch exposes a bug in another seldom used extension of the `Graph`
class, `GraphBundle`.
{{{
File "/Users/rlmill/sage-4.3.3/devel/sage-
main/sage/graphs/graph_bundle.py", line 163:
sage: B.plot()
Exception raised:
Traceback (most recent call last):
File "/Users/rlmill/sage-4.3.3/local/bin/ncadoctest.py", line 1231,
in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/rlmill/sage-4.3.3/local/bin/sagedoctest.py", line 38,
in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/Users/rlmill/sage-4.3.3/local/bin/ncadoctest.py", line 1172,
in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_5[5]>", line 1, in <module>
B.plot()###line 163:
sage: B.plot()
File "/Users/rlmill/sage-4.3.3/local/lib/python/site-
packages/sage/graphs/graph_bundle.py", line 173, in plot
total_pos = generic_graph_pyx.spring_layout_fast(self,
iterations=iters)
File "generic_graph_pyx.pyx", line 86, in
sage.graphs.generic_graph_pyx.spring_layout_fast
(sage/graphs/generic_graph_pyx.c:1361)
File "/Users/rlmill/sage-4.3.3/local/lib/python/site-
packages/sage/graphs/graph.py", line 2061, in to_undirected
return copy(self)
File "/Users/rlmill/sage-4.3.3/local/lib/python2.6/copy.py", line
79, in copy
return copier(x)
File "/Users/rlmill/sage-4.3.3/local/lib/python/site-
packages/sage/graphs/generic_graph.py", line 483, in __copy__
G = self.__class__(self, name=self.name(), pos=copy(self._pos),
boundary=copy(self._boundary), implementation=implementation,
sparse=sparse)
File "/Users/rlmill/sage-4.3.3/local/lib/python/site-
packages/sage/graphs/graph_bundle.py", line 73, in __init__
if isinstance(args[0], (list, tuple)):
IndexError: tuple index out of range
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8329#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.