From 3ace9e239a72ac469f8bbfb62a29113be971bc04 Mon Sep 17 00:00:00 2001 From: Nicholas Landry Date: Wed, 25 Oct 2023 16:25:53 -0400 Subject: [PATCH] make views respect order --- xgi/core/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xgi/core/views.py b/xgi/core/views.py index 1d4acad8a..5ff28b5e8 100644 --- a/xgi/core/views.py +++ b/xgi/core/views.py @@ -511,7 +511,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):