Fix random tree on one or less vertices
Closed this issue · 10 comments
kliem commented
sage: graphs.RandomTree(1)
...
TypeError: unhashable type: 'list'
Component: graph theory
Keywords: random tree
Author: Jonathan Kliem
Branch/Commit: b736c96
Reviewer: David Coudert
Issue created by migration from https://trac.sagemath.org/ticket/32108
kliem commented
Branch: public/32108
dcoudert commented
comment:3
It might be better to do
- g = Graph()
+ g = Graph(n)
+ if n < 2:
+ return gand then remove the line
- g.add_vertices(range(n))sagetrac-git commented
Branch pushed to git repo; I updated commit sha1. New commits:
b736c96 | more natural treating of small cases for random tree |
sagetrac-git commented
dcoudert commented
comment:5
LGTM.
dcoudert commented
Reviewer: David Coudert
kliem commented
comment:6
Thank you.
vbraun commented
Changed branch from public/32108 to b736c96