fix custom clustering by checking explicitly for series (#318)
This commit is contained in:
parent
3eec027db6
commit
8dafb7bc83
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user