added comment
This commit is contained in:
parent
3ffddb1638
commit
da7e7ab5b0
1 changed files with 1 additions and 1 deletions
|
|
@ -113,7 +113,7 @@ def get_dist_series_list(brand: str, n_locs: int):
|
||||||
# split the distances matrix into a list of series, which allows us to sort each row
|
# split the distances matrix into a list of series, which allows us to sort each row
|
||||||
dist_series_list = []
|
dist_series_list = []
|
||||||
for i in dist_matrix:
|
for i in dist_matrix:
|
||||||
dist_series_list.append(pd.Series(i).sort_values().head(n_locs+1)[1:])
|
dist_series_list.append(pd.Series(i).sort_values().head(n_locs+1)[1:]) #ignore the 0th element (dist to itself)
|
||||||
|
|
||||||
cached_series[brand] = (n_locs, dist_series_list)
|
cached_series[brand] = (n_locs, dist_series_list)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue