We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
immutable=True
sage: B = BipartiteGraph(matrix([[1, 1], [1, 1]]), immutable=True)
build the bipartite graph
sage: B = BipartiteGraph(matrix([[1, 1], [1, 1]]), immutable=True) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[4], line 1 ----> 1 B = BipartiteGraph(matrix([[Integer(1), Integer(1)], [Integer(1), Integer(1)]]), immutable=True) File ~/sage/src/sage/graphs/bipartite_graph.py:478, in BipartiteGraph.__init__(self, data, partition, check, hash_labels, *args, **kwds) 474 self.right = set(range(ncols, nrows + ncols)) 476 # ensure that the vertices exist even if there 477 # are no associated edges (trac #10356) --> 478 self.add_vertices(self.left) 479 self.add_vertices(self.right) 481 if kwds.get("multiedges", False): File ~/sage/src/sage/graphs/generic_graph.py:11446, in GenericGraph.add_vertices(self, vertices) 11411 def add_vertices(self, vertices): 11412 """ 11413 Add vertices to the (di)graph from an iterable container of vertices. 11414 (...) 11444 [0, 6] 11445 """ > 11446 return self._backend.add_vertices(vertices) File ~/sage/src/sage/graphs/base/static_sparse_backend.pyx:603, in sage.graphs.base.static_sparse_backend.StaticSparseBackend.add_vertices() 601 ValueError: graph is immutable; please change a copy instead (use function copy()) 602 """ --> 603 raise ValueError("graph is immutable; please change a copy instead (use function copy())") 604 605 cpdef del_edge(self, object u, object v, object l, bint directed): ValueError: graph is immutable; please change a copy instead (use function copy())
No response
The text was updated successfully, but these errors were encountered:
sage/graphs/generic_graph.py
No branches or pull requests
Steps To Reproduce
Expected Behavior
build the bipartite graph
Actual Behavior
Additional Information
No response
Environment
Checklist
The text was updated successfully, but these errors were encountered: