We should raise an error instead of a warning (As pointed out by @MechCoder [here](https://github.com/scikit-learn/scikit-learn/pull/5703#discussion_r49243981)) ``` python import numpy as np from sklearn.cross_validation import StratifiedKFold as OldSKF from sklearn.model_selection import StratifiedKFold X = np.array([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]]) y = np.array([3, 3, -1, -1, 2, 2]) for tr, te in OldSKF(y, n_folds=3): print tr, te ``` ``` python [1 3 5] [0 2 4] [0 2 4] [1 3 5] [0 1 2 3 4 5] [] ``` ``` python for tr, te in StratifiedKFold(n_folds=6).split(X, y): print tr, te ``` ``` python [1 3 5] [0 2 4] [0 2 4] [1 3 5] [0 1 2 3 4 5] [] [0 1 2 3 4 5] [] [0 1 2 3 4 5] [] [0 1 2 3 4 5] [] ``` To be tagged "Easy", "Need Contributor" **cc:** @mechcoder @amueller @jnothman