mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 00:05:01 +00:00
fix: Handle ZeroDivisionError in PageRank calculation
This commit is contained in:
parent
ed1eb38c5f
commit
a4b79127b0
1 changed files with 5 additions and 1 deletions
|
@ -398,7 +398,11 @@ class RepoMap:
|
|||
try:
|
||||
ranked = nx.pagerank(G, weight="weight", **pers_args)
|
||||
except ZeroDivisionError:
|
||||
return []
|
||||
# Issue #1536
|
||||
try:
|
||||
ranked = nx.pagerank(G, weight="weight")
|
||||
except ZeroDivisionError:
|
||||
return []
|
||||
|
||||
# distribute the rank from each source node, across all of its out edges
|
||||
ranked_definitions = defaultdict(float)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue