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 constructor used in clear_edges() #198

Closed
tomcjackc opened this issue Oct 17, 2022 · 1 comment · Fixed by #199
Closed

Wrong constructor used in clear_edges() #198

tomcjackc opened this issue Oct 17, 2022 · 1 comment · Fixed by #199

Comments

@tomcjackc
Copy link

On line 885 of hypergraph.py, the wrong constructor is used when resetting the nodes during the action of the clear_edges() method. The dict constructor ({}) is used when it should be the set constructor (set()). This means that an error is raised when trying to add edges back after clearing all edges.

Error raised: AttributeError: 'dict' object has no attribute 'add'

This can be rectified by replacing the {} with set() on line 885.

leotrs added a commit that referenced this issue Oct 17, 2022
@leotrs leotrs mentioned this issue Oct 17, 2022
@leotrs
Copy link
Collaborator

leotrs commented Oct 17, 2022

Hello @tomcjackc and thank you very much for filing this issue and suggesting a solution. I have made a new PR #199 addressing this.

Please feel free to open any more issues as you encounter them! Thanks for contributing to XGI.

leotrs added a commit that referenced this issue Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants