You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sagemathgh-39754: Fix bipartite graph constructor for reduced adjacency matrix with `immutable=True`
Related to issue `sagemath#39295`
Previously, when a reduced adjacency matrix was provided and
`immutable=True` was set, the graph construction failed. This fix
ensures that the graph is correctly constructed and behaves as expected.
This issue occurred because the parent class `Graph` constructor was
called with `immutable=True` and then attempted to add vertices and
edges after construction, which is not allowed.
The fix prepares the vertex list and edge list before calling the parent
class constructor with the precomputed vertices and edges.
### 📝 Checklist
<!-- Put an `x` in all the boxes that apply. -->
- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
URL: sagemath#39754
Reported by: Ziad Tarek
Reviewer(s): David Coudert, user202729, Ziad Tarek
0 commit comments