diff --git a/xgi/core/diviews.py b/xgi/core/diviews.py index 4f2e7f34e..86c4fc0b3 100644 --- a/xgi/core/diviews.py +++ b/xgi/core/diviews.py @@ -365,7 +365,7 @@ def from_view(cls, view, bunch=None): wrong = bunch - all_ids if wrong: raise IDNotFound(f"IDs {wrong} not in the hypergraph") - newview._ids = bunch + newview._ids = [i for i in view._id_dict if i in bunch] return newview def _from_iterable(self, it):