Skip to content

Commit f49e23f

Browse files
committed
Format files
1 parent 0077b75 commit f49e23f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

riskfolio/src/AuxFunctions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ def two_diff_gap_stat(dist, clustering, max_k=10):
723723
for k in cluster_k:
724724
if k == 1:
725725
W_list.append(-np.inf)
726-
elif k > min(max_k, np.sqrt(n))+2:
726+
elif k > min(max_k, np.sqrt(n)) + 2:
727727
break
728728
else:
729729
level = cluster_lvls[level_k[cluster_k.index(k)]] # get k clusters

riskfolio/src/PlotFunctions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2882,7 +2882,7 @@ def plot_clusters(
28822882
root, nodes = hr.to_tree(clustering, rd=True)
28832883
nodes = np.array([i.dist for i in nodes])
28842884
nodes.sort()
2885-
leaders_threshold = nodes[np.max(L)+1]
2885+
leaders_threshold = nodes[np.max(L) + 1]
28862886
color_threshold = np.max(leaders_threshold)
28872887
colors = af.color_list(k)
28882888
hr.set_link_color_palette(colors)
@@ -3185,7 +3185,7 @@ def plot_dendrogram(
31853185
root, nodes = hr.to_tree(clustering, rd=True)
31863186
nodes = np.array([i.dist for i in nodes])
31873187
nodes.sort()
3188-
leaders_threshold = nodes[np.max(L)+1]
3188+
leaders_threshold = nodes[np.max(L) + 1]
31893189
color_threshold = np.max(leaders_threshold)
31903190
colors = af.color_list(k) # color list
31913191
hr.set_link_color_palette(colors)

0 commit comments

Comments
 (0)