mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-07 03:07:46 +08:00
pyupgrade --py37-plus **/*.py (#1654)
* pyupgrade --py37-plus **/*.py * fixup! Format Python code with psf/black push
This commit is contained in:

committed by
John Law

parent
34c808b375
commit
28419cf839
@ -126,7 +126,7 @@ def plot_heterogeneity(heterogeneity, k):
|
||||
plt.plot(heterogeneity, linewidth=4)
|
||||
plt.xlabel("# Iterations")
|
||||
plt.ylabel("Heterogeneity")
|
||||
plt.title("Heterogeneity of clustering over time, K={0:d}".format(k))
|
||||
plt.title(f"Heterogeneity of clustering over time, K={k:d}")
|
||||
plt.rcParams.update({"font.size": 16})
|
||||
plt.show()
|
||||
|
||||
@ -164,7 +164,7 @@ def kmeans(
|
||||
num_changed = np.sum(prev_cluster_assignment != cluster_assignment)
|
||||
if verbose:
|
||||
print(
|
||||
" {0:5d} elements changed their cluster assignment.".format(
|
||||
" {:5d} elements changed their cluster assignment.".format(
|
||||
num_changed
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user