Skip to content

MAINT Parameters validation for sklearn.datasets.load_iris #26177

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

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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: 2 additions & 0 deletions sklearn/datasets/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from ..utils import check_random_state
from ..utils import check_pandas_support
from ..utils.fixes import _open_binary, _open_text, _read_text, _contents
from ..utils._param_validation import validate_params

import numpy as np

Expand Down Expand Up @@ -545,6 +546,7 @@ def load_wine(*, return_X_y=False, as_frame=False):
)


@validate_params({"return_X_y": ["boolean"], "as_frame": ["boolean"]})
def load_iris(*, return_X_y=False, as_frame=False):
"""Load and return the iris dataset (classification).

Expand Down
1 change: 1 addition & 0 deletions sklearn/tests/test_public_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def _check_function_param_validation(
"sklearn.datasets.fetch_lfw_people",
"sklearn.datasets.fetch_olivetti_faces",
"sklearn.datasets.fetch_rcv1",
"sklearn.datasets.load_iris",
"sklearn.datasets.load_svmlight_file",
"sklearn.datasets.load_svmlight_files",
"sklearn.datasets.make_biclusters",
Expand Down