Skip to content

Commit

Permalink
Drop duplicate values
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraBuettner committed Jan 13, 2025
1 parent 74682bb commit 187b906
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion etrago/cluster/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,10 @@ def kmedoids_dijkstra_clustering(
)
distances = distances.apply(pd.to_numeric)

medoid_idx = distances.idxmin()
medoid_idx = distances.idxmin().drop_duplicates()

if len(busmap) > n_clusters:

# dijkstra's algorithm
busmap = dijkstras_algorithm(
buses,
Expand Down

0 comments on commit 187b906

Please sign in to comment.