Skip to content

Commit

Permalink
Update _pkbc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rmj3197 committed Sep 2, 2024
1 parent ada672d commit 94050c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions QuadratiK/spherical_clustering/_pkbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def fit(self, dat):
self.dat = self.dat.to_numpy()

if not isinstance(self.num_clust, (int, range, list, np.ndarray)):
raise Exception(
raise TypeError(
"Please input only integer, list and np.ndarray for num_clust"
)

Expand All @@ -209,7 +209,7 @@ def fit(self, dat):
f"Unrecognized value {self.stopping_rule} in input parameter."
)
if self.init_method not in ["sampledata"]:
raise Exception(
raise ValueError(
f"Unrecognized value {self.init_method} in input parameter."
)
if self.num_init < 1:
Expand Down Expand Up @@ -591,7 +591,7 @@ def plot(self, num_clust, y_true=None):
Returns a 2D matplotlib figure object or 3D plotly figure object with data points plotted on it.
"""
if self.dat.shape[1] < 2:
raise Exception(
raise ValueError(
"Plot is not implemented when dimensionality is less than 2."
)

Expand Down

0 comments on commit 94050c0

Please sign in to comment.