Opened 4 years ago
Closed 4 years ago
#27176 closed enhancement (fixed)
py3: fix doctest in generic_graph (part 1)
Reported by: | dcoudert | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.7 |
Component: | graph theory | Keywords: | py3, graph |
Cc: | kdilks | Merged in: | |
Authors: | David Coudert | Reviewers: | Kevin Dilks |
Report Upstream: | N/A | Work issues: | |
Branch: | 9f3c0eb (Commits, GitHub, GitLab) | Commit: | 9f3c0eba5d68f5dc5b4225198ae3fb2e932905b5 |
Dependencies: | Stopgaps: |
Description
We fix doctests in
incidence_matrix
: we change the example fromCubeGraph
toPetersenGraph
as it is stable forpy2
andpy3
. It is possible to fix the order of the rows of the matrix with parametervertices
, but the order of the columns depends on.edge_iterator()
which itself depends on.vertex_iterator()
which is not always the same in py3 than in py2. An alternative would be to add parameteredges
to the method to specify the ordering of the columns...
eulerian_circuit
: we fix the issue by changing the way the graph. It changes the internal order of vertices and edges and this is sufficient for getting same result in py2 and py3. With original construction, the internal order of vertices was depending on the order of the keys of the input dict (might be different in py2 and py3)
min_spanning_tree
: we sort the edges of the solution.
Change History (5)
comment:1 Changed 4 years ago by
- Branch set to public/27176_generic_graph_1
- Commit set to 9f3c0eba5d68f5dc5b4225198ae3fb2e932905b5
comment:2 Changed 4 years ago by
- Status changed from new to needs_review
comment:3 Changed 4 years ago by
- Cc kdilks added
comment:4 Changed 4 years ago by
- Reviewers set to Kevin Dilks
- Status changed from needs_review to positive_review
comment:5 Changed 4 years ago by
- Branch changed from public/27176_generic_graph_1 to 9f3c0eba5d68f5dc5b4225198ae3fb2e932905b5
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
New commits:
trac #27176: doctests in generic_graph part 1