Skip to content

Commit

Permalink
Removed noqa
Browse files Browse the repository at this point in the history
  • Loading branch information
AS-L-C committed Jul 13, 2024
1 parent c7f3f5c commit b13c7dd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(
def init_clust_alg(self, cluster_alg: str):
cluster_algs = {"KMeans": KMeans}
if cluster_alg not in cluster_algs:
warnings.warn( # noqa: B028
warnings.warn(
f"KMeans will be used since the algorithm {cluster_alg} was not recognized. Available algorithms: {list(cluster_algs.values())}",
stacklevel=2,
)
Expand Down Expand Up @@ -103,13 +103,13 @@ def find_k_largest_diff():

if k is None or k == 1:
# Fall back to using largest absolute difference in case gap heuristic did not work
warnings.warn( # noqa: B028
warnings.warn(
"Unable to confidently determine the number of clusters n_c. The largest difference between consecutive eigenvalues was used to determine the number of clusters. Please provide n_c.",
stacklevel=2,
)
k = find_k_largest_diff()
if k == 1:
warnings.warn( # noqa: B028
warnings.warn(
"Please provide the number of clusters n_c. The heuristics identified a single cluster and n_c was set to 2.",
stacklevel=2,
)
Expand Down

0 comments on commit b13c7dd

Please sign in to comment.