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

Set operations on NodeView not working #206

Closed
leotrs opened this issue Oct 31, 2022 · 0 comments
Closed

Set operations on NodeView not working #206

leotrs opened this issue Oct 31, 2022 · 0 comments

Comments

@leotrs
Copy link
Collaborator

leotrs commented Oct 31, 2022

In [100]: H.nodes.filterby_attr('color', 'purple') - H.nodes.filterby_attr('name', 'Elena')
------------------------------------------------------------------------
AttributeError                         Traceback (most recent call last)
<ipython-input-125-d1330d064101> in <module>
----> 1 H.nodes.filterby_attr('color', 'purple') - H.nodes.filterby_attr('name', 'Elena')

/usr/lib/python3.8/_collections_abc.py in __sub__(self, other)
    499                 return NotImplemented
    500             other = self._from_iterable(other)
--> 501         return self._from_iterable(value for value in self
    502                                    if value not in other)
    503 

/usr/lib/python3.8/_collections_abc.py in _from_iterable(cls, it)
    470         does not accept an iterable for an input.
    471         '''
--> 472         return cls(it)
    473 
    474     def __and__(self, other):

~/code/xgi/xgi/classes/reportviews.py in __init__(self, H, bunch)
    524         else:
    525             super().__init__(
--> 526                 H._node, H._node_attr, H._edge, H._edge_attr, dispatcher, bunch
    527             )
    528 

AttributeError: 'generator' object has no attribute '_node'
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

No branches or pull requests

1 participant