Skip to content

Commit

Permalink
Format files
Browse files Browse the repository at this point in the history
  • Loading branch information
dcajasn committed Jul 20, 2024
1 parent 0077b75 commit f49e23f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion riskfolio/src/AuxFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ def two_diff_gap_stat(dist, clustering, max_k=10):
for k in cluster_k:
if k == 1:
W_list.append(-np.inf)
elif k > min(max_k, np.sqrt(n))+2:
elif k > min(max_k, np.sqrt(n)) + 2:
break
else:
level = cluster_lvls[level_k[cluster_k.index(k)]] # get k clusters
Expand Down
4 changes: 2 additions & 2 deletions riskfolio/src/PlotFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2882,7 +2882,7 @@ def plot_clusters(
root, nodes = hr.to_tree(clustering, rd=True)
nodes = np.array([i.dist for i in nodes])
nodes.sort()
leaders_threshold = nodes[np.max(L)+1]
leaders_threshold = nodes[np.max(L) + 1]
color_threshold = np.max(leaders_threshold)
colors = af.color_list(k)
hr.set_link_color_palette(colors)
Expand Down Expand Up @@ -3185,7 +3185,7 @@ def plot_dendrogram(
root, nodes = hr.to_tree(clustering, rd=True)
nodes = np.array([i.dist for i in nodes])
nodes.sort()
leaders_threshold = nodes[np.max(L)+1]
leaders_threshold = nodes[np.max(L) + 1]
color_threshold = np.max(leaders_threshold)
colors = af.color_list(k) # color list
hr.set_link_color_palette(colors)
Expand Down

0 comments on commit f49e23f

Please sign in to comment.