Skip to content

Commit a0857e9

Browse files
committed
update readme example
1 parent de5290c commit a0857e9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ Here is a minimal use case:
6060
6161
6262
# Load a data set
63-
dataset = load_iris()
64-
X, y = dataset.data, dataset.target
63+
X, y = load_iris(return_X_y=True)
6564
6665
# Split in training and testing set
6766
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.7, stratify=y, random_state=42)

examples/minimal.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77

88
# Load a data set
9-
dataset = load_iris()
10-
X, y = dataset.data, dataset.target
9+
X, y = load_iris(return_X_y=True)
1110

1211
# Split in training and testing set
1312
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.7, stratify=y, random_state=42)

0 commit comments

Comments
 (0)