cluster_network: The 'squeeze' parameter is deprecated and will be removed in a future release; works just fine without it
This commit is contained in:
parent
047276b2dc
commit
9331f1ec46
@ -257,7 +257,7 @@ def busmap_for_n_clusters(n, n_clusters, solver_name, focus_weights=None, algori
|
|||||||
else:
|
else:
|
||||||
raise ValueError(f"`algorithm` must be one of 'kmeans', 'spectral' or 'louvain'. Is {algorithm}.")
|
raise ValueError(f"`algorithm` must be one of 'kmeans', 'spectral' or 'louvain'. Is {algorithm}.")
|
||||||
|
|
||||||
return (n.buses.groupby(['country', 'sub_network'], group_keys=False, squeeze=True)
|
return (n.buses.groupby(['country', 'sub_network'], group_keys=False)
|
||||||
.apply(busmap_for_country).rename('busmap'))
|
.apply(busmap_for_country).rename('busmap'))
|
||||||
|
|
||||||
def plot_busmap_for_n_clusters(n, n_clusters=50):
|
def plot_busmap_for_n_clusters(n, n_clusters=50):
|
||||||
|
Loading…
Reference in New Issue
Block a user