From c688855083a2ae714fc46ad2e444c525a4516c1a Mon Sep 17 00:00:00 2001 From: Jordan Matelsky Date: Wed, 17 Apr 2024 13:24:44 -0400 Subject: [PATCH] Add explicit number of nodes/edges calls to dialect --- grand/dialects/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/grand/dialects/__init__.py b/grand/dialects/__init__.py index f0e080e..8326721 100644 --- a/grand/dialects/__init__.py +++ b/grand/dialects/__init__.py @@ -183,6 +183,12 @@ def is_directed(self): def __len__(self): return self.parent.backend.get_node_count() + def number_of_nodes(self): + return self.parent.backend.get_node_count() + + def number_of_edges(self): + return self.parent.backend.get_edge_count() + class IGraphDialect(nx.Graph): """