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

Bug in memberships #171

Closed
leotrs opened this issue Sep 14, 2022 · 0 comments · Fixed by #172
Closed

Bug in memberships #171

leotrs opened this issue Sep 14, 2022 · 0 comments · Fixed by #172

Comments

@leotrs
Copy link
Collaborator

leotrs commented Sep 14, 2022

The last line in the following code block should return the memberships of the nodes 1, 2, 3. Instead, it returns all nodes!

In [5]: import xgi
In [7]: H = xgi.Hypergraph([{1, 2, 3}, {4}, {5, 6}, {6, 7, 8}])
In [8]: H.nodes.memberships()
Out[8]: {1: {0}, 2: {0}, 3: {0}, 4: {1}, 5: {2}, 6: {2, 3}, 8: {3}, 7: {3}}
In [9]: H.nodes([1,2,3]).memberships()
Out[9]: {1: {0}, 2: {0}, 3: {0}, 4: {1}, 5: {2}, 6: {2, 3}, 8: {3}, 7: {3}}
@nwlandry nwlandry mentioned this issue Sep 14, 2022
nwlandry added a commit that referenced this issue Sep 14, 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.

1 participant