From 0c6aa8fbac6d1b595eff9e384120968b8baae3d0 Mon Sep 17 00:00:00 2001 From: Brenda Praggastis Date: Mon, 10 Jun 2024 15:19:22 -0700 Subject: [PATCH] fixes issue 151 on Github --- hypernetx/algorithms/s_centrality_measures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypernetx/algorithms/s_centrality_measures.py b/hypernetx/algorithms/s_centrality_measures.py index e56f55cd..4915ca3d 100644 --- a/hypernetx/algorithms/s_centrality_measures.py +++ b/hypernetx/algorithms/s_centrality_measures.py @@ -77,7 +77,7 @@ def _s_centrality(func, H, s=1, edges=True, f=None, return_singletons=True, **kw vertices = h.nodes if h.shape[edges * 1] == 1: - stats = {v: 0 for v in vertices} + stats.update({v: 0 for v in vertices}) else: g = h.get_linegraph(s=s, edges=edges) stats.update({k: v for k, v in func(g, **kwargs).items()})