Skip to content

Commit

Permalink
Merge pull request #934 from janezd/single-class
Browse files Browse the repository at this point in the history
Paint data: Do not output class column if only a single class is present
  • Loading branch information
BlazZupan committed Dec 19, 2015
2 parents 7b8dd4f + 9369a0a commit d4d2c9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Orange/widgets/data/owpaintdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ def commit(self):
else:
X, Y = self.data[:, np.newaxis, 0], self.data[:, 2]
attrs = (Orange.data.ContinuousVariable(self.attr1),)
if len(self.class_model) > 1:
if len(np.unique(Y)) >= 2:
domain = Orange.data.Domain(
attrs,
Orange.data.DiscreteVariable(
Expand Down

0 comments on commit d4d2c9f

Please sign in to comment.