Skip to content
New issue

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

wrong error message when deleting a vertex from a static sparse graph #39270

Open
2 tasks done
dcoudert opened this issue Jan 4, 2025 · 0 comments · May be fixed by #39271
Open
2 tasks done

wrong error message when deleting a vertex from a static sparse graph #39270

dcoudert opened this issue Jan 4, 2025 · 0 comments · May be fixed by #39271

Comments

@dcoudert
Copy link
Contributor

dcoudert commented Jan 4, 2025

Steps To Reproduce

sage: G = Graph([('a', 1), (1, 2), (2, 3)], immutable=True)
sage: type(G._backend)
<class 'sage.graphs.base.static_sparse_backend.StaticSparseBackend'>

Expected Behavior

sage: G.delete_vertex(1)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
ValueError: graph is immutable; please change a copy instead (use function copy())
sage: G.delete_vertex('a')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
ValueError: graph is immutable; please change a copy instead (use function copy())

Actual Behavior

sage: G.delete_vertex(1)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
ValueError: graph is immutable; please change a copy instead (use function copy())
sage: G.delete_vertex('a')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
TypeError: an integer is required

Additional Information

No response

Environment

  • OS: all
  • Sage Version: 10.6.beta2

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant