Please read the help message for adjaceny_matrix. g = Graph([('A',1)]) g.adjacency_matrix?
prints, among other things: * "vertices" -- list (default: "None"); the ordering of the vertices defining how they should appear in the matrix. By default, the ordering given by "GenericGraph.vertices()" with "sort=True" is used. If the vertices are not comparable, the keyword "vertices" must be used to specify an ordering, or a TypeError exception will be raised. Your vertices are not comparable. On Monday, June 26, 2023 at 8:20:50 AM UTC-7 Georgi Guninski wrote: > In both 9.6 and https://sagecell.sagemath.org/ > > Graph([('A',1)]).adjacency_matrix() > > raises exception > > TypeError: '<' not supported between instances of 'int' and 'str' > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/b35e2927-c2ff-4541-9167-2e0d54a32a5an%40googlegroups.com.