Skip to content

Commit

Permalink
Changed Error trigger and message
Browse files Browse the repository at this point in the history
  • Loading branch information
rokgomiscek committed Jan 24, 2020
1 parent d5fee3f commit 0d348df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Orange/widgets/unsupervised/owtsne.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ class Information(OWDataProjectionWidget.Information):

class Error(OWDataProjectionWidget.Error):
not_enough_rows = Msg("Input data needs at least 2 rows")
not_enough_cols = Msg("Input data needs at least 2 attributes")
constant_data = Msg("Input data is constant")
no_attributes = Msg("Data has no attributes")
no_valid_data = Msg("No projection due to no valid data")

def __init__(self):
Expand Down Expand Up @@ -387,8 +387,8 @@ def error(err):
if len(self.data) < 2:
error(self.Error.not_enough_rows)

elif not self.data.domain.attributes:
error(self.Error.no_attributes)
elif len(self.data.domain.attributes) < 2:
error(self.Error.not_enough_cols)

elif not self.data.is_sparse():
if np.all(~np.isfinite(self.data.X)):
Expand Down

0 comments on commit 0d348df

Please sign in to comment.