Skip to content

FIX add argument to _check_sample_weight #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: submodulev3
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sklearn/tree/_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def _fit(
max_leaf_nodes = -1 if self.max_leaf_nodes is None else self.max_leaf_nodes

if sample_weight is not None:
sample_weight = _check_sample_weight(sample_weight, X, DOUBLE)
sample_weight = _check_sample_weight(sample_weight, X, dtype=DOUBLE)

if y is not None and expanded_class_weight is not None:
if sample_weight is not None:
Expand Down
Loading