Skip to content

Commit

Permalink
avoid cretion of temporary file
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosEpia committed Nov 17, 2023
1 parent 024e852 commit 70eebdc
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions etrago/cluster/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ def busmap_by_shortest_path(etrago, fromlvl, tolvl, cpu_cores=4):
chunksize = ceil(len(ppaths) / cpu_cores)
container = p.starmap(shortest_path, gen(ppaths, chunksize, M))
df = pd.concat(container)
dump(df, open("df.p", "wb"))

# post processing
df.sort_index(inplace=True)
Expand Down Expand Up @@ -654,7 +653,6 @@ def dijkstras_algorithm(buses, connections, medoid_idx, cpu_cores):
chunksize = ceil(len(ppathss) / cpu_cores)
container = p.starmap(shortest_path, gen(ppathss, chunksize, M))
df = pd.concat(container)
dump(df, open("df.p", "wb"))

# assignment of data points to closest k-medoids centers
df["path_length"] = pd.to_numeric(df["path_length"])
Expand Down

0 comments on commit 70eebdc

Please sign in to comment.