Nice; you're using an open-source textbook?
Use multiedges=False when you create the DiGraph:
DiGraph(H,multiedges=False)
See http://aleph.sagemath.org/?q=a5b9d087-bbc0-4062-b8c4-2d73e72f231b
Thanks,
Jason
Or you can fix H (this implements what you say in your yellow comment):
H=H.apply_map(lambda x: 1 if x!=0 else 0)
Thanks,
Jason
Thanks. I think I prefer using apply_map.
Yes, the book is open content. We made the it public about a month ago.
Ken
Oh, right, we had this discussion a month ago. Thanks again! I just
sent the URL to one of our faculty to consider the book for our discrete
class.
Jason