diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index 99d428d4..844d5b17 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -269,7 +269,7 @@ def clustering_for_n_clusters(n, n_clusters, custom_busmap=False, aggregate_carr else: raise AttributeError(f"potential_mode should be one of 'simple' or 'conservative' but is '{potential_mode}'") - if not custom_busmap: + if not isinstance(custom_busmap, pd.Series): busmap = busmap_for_n_clusters(n, n_clusters, solver_name, focus_weights, algorithm) else: busmap = custom_busmap