Skip to content

Commit

Permalink
forest uses DOUBLE for y
Browse files Browse the repository at this point in the history
  • Loading branch information
pprett committed Jul 21, 2012
1 parent 2cce14c commit ea8c899
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sklearn/ensemble/forest.py
Expand Up @@ -44,7 +44,7 @@ class calls the ``fit`` method of each sub-estimator on random samples
from ..feature_selection.selector_mixin import SelectorMixin
from ..tree import DecisionTreeClassifier, DecisionTreeRegressor, \
ExtraTreeClassifier, ExtraTreeRegressor
from ..tree._tree import DTYPE
from ..tree._tree import DTYPE, DOUBLE
from ..utils import array2d, check_random_state
from ..metrics import r2_score

Expand Down Expand Up @@ -269,7 +269,7 @@ def fit(self, X, y):
y[:, k] = np.searchsorted(unique, y[:, k])

if getattr(y, "dtype", None) != DTYPE or not y.flags.contiguous:
y = np.ascontiguousarray(y, dtype=DTYPE)
y = np.ascontiguousarray(y, dtype=DOUBLE)

# Assign chunk of trees to jobs
n_jobs, n_trees, _ = _partition_trees(self)
Expand Down

0 comments on commit ea8c899

Please sign in to comment.