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

All attributes of views are being exposed via Hypergraph #408

Open
leotrs opened this issue Jun 19, 2023 · 0 comments
Open

All attributes of views are being exposed via Hypergraph #408

leotrs opened this issue Jun 19, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@leotrs
Copy link
Collaborator

leotrs commented Jun 19, 2023

The stats package was designed so that users could immediately access stats from the main hypergraph object:

>>> H.degree()
{1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 2, 8: 1, 7: 1}

However, this was done by exposing all of IDView's methods (which include stats) but also include others that we don't want to expose via Hypergraph, such as:

>>> H.filterby()
TypeError: IDView.filterby() missing 2 required positional arguments: 'stat' and 'val'

>>> H.neighbors()
TypeError: IDView.neighbors() missing 1 required positional argument: 'id'

>>> H.memberships()
AttributeError: 'dict' object has no attribute 'asdict'
@leotrs leotrs added the bug Something isn't working label Jun 19, 2023
@leotrs leotrs self-assigned this Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant