Skip to content

Commit

Permalink
Merge pull request #2822 from jerneju/class_y_float
Browse files Browse the repository at this point in the history
[FIX] Table: classes (Y) must be float
  • Loading branch information
janezd authored Dec 8, 2017
2 parents 48d8584 + 41604f4 commit 1ac870f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Orange/data/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def from_numpy(cls, domain, X, Y=None, metas=None, W=None):

if Y is None:
if sp.issparse(X):
Y = np.empty((X.shape[0], 0), object)
Y = np.empty((X.shape[0], 0), dtype=np.float64)
else:
Y = X[:, len(domain.attributes):]
X = X[:, :len(domain.attributes)]
Expand Down

0 comments on commit 1ac870f

Please sign in to comment.