train_test_split returns `ValueError` after `np.reshape`

### Describe the bug

Hello,

  after I apply a `np.reshape` on my dataset `train_test_split` cannot split the dataset. Without `np.reshape` works all good, but I need it.

Thanks.
Have a nice day.

### Steps/Code to Reproduce

```python
# load dataset
f = np.load('./new_dataset.npz')
signals = f['signals']
labels = f['labels']

# downsample to 50 Hz (6 sec windows)
if (signals.shape[0] % 2) != 0:
    signals = signals[:-1]
    labels = labels[:-1]

signals = np.reshape(signals, (-1, 600, signals.shape[-1]))
labels = np.reshape(labels, (-1, 600))

signals = signals[:, ::2]
labels = labels[:, ::2]

print(f"signals: {signals.shape}")
print(f"labels: {labels.shape}")

# split to train-test
X_train, X_test, y_train, y_test = train_test_split(
    signals, labels, test_size=0.15, random_state=9, stratify=labels
)
X_train, X_val, y_train, y_val = train_test_split(
    X_train, y_train, test_size=0.15, random_state=9, stratify=y_train
)
print(X_train.shape, y_train.shape)
print(X_test.shape, y_test.shape)
print(X_val.shape, y_val.shape)
```

### Expected Results

signals: (41564, 300, 6)
labels: (41564, 300)

### Actual Results

```python
signals: (41564, 300, 6)
labels: (41564, 300)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/var/folders/7v/fqqcktvs23qc8fwgftjpz_gh0000gn/T/ipykernel_15879/1199612105.py in <module>
     42 
     43 # split to train-test
---> 44 X_train, X_test, y_train, y_test = train_test_split(
     45     signals, labels, test_size=0.15, random_state=9, stratify=labels
     46 )

~/miniforge3/lib/python3.9/site-packages/sklearn/model_selection/_split.py in train_test_split(test_size, train_size, random_state, shuffle, stratify, *arrays)
   2439         cv = CVClass(test_size=n_test, train_size=n_train, random_state=random_state)
   2440 
-> 2441         train, test = next(cv.split(X=arrays[0], y=stratify))
   2442 
   2443     return list(

~/miniforge3/lib/python3.9/site-packages/sklearn/model_selection/_split.py in split(self, X, y, groups)
   1598         """
   1599         X, y, groups = indexable(X, y, groups)
-> 1600         for train, test in self._iter_indices(X, y, groups):
   1601             yield train, test
   1602 

~/miniforge3/lib/python3.9/site-packages/sklearn/model_selection/_split.py in _iter_indices(self, X, y, groups)
   1938         class_counts = np.bincount(y_indices)
   1939         if np.min(class_counts) < 2:
-> 1940             raise ValueError(
   1941                 "The least populated class in y has only 1"
   1942                 " member, which is too few. The minimum"

ValueError: The least populated class in y has only 1 member, which is too few. The minimum number of groups for any class cannot be less than 2.
```

### Versions

```shell
System:
    python: 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:24:02)  [Clang 11.1.0 ]
executable: /Users/martin/miniforge3/bin/python
   machine: macOS-12.2.1-arm64-arm-64bit

Python dependencies:
          pip: 21.3.1
   setuptools: 59.4.0
      sklearn: 1.0.2
        numpy: 1.21.5
        scipy: 1.7.3
       Cython: 0.29.26
       pandas: 1.3.5
   matplotlib: 3.5.1
       joblib: 1.1.0
threadpoolctl: 3.0.0

Built with OpenMP: True
```

COMMENT:
The labels has shape `(41564, 300)`, which scikit-learn interprets as 300 labels for each sample, which is interpreted as a multi-label problem. This code snippet can not stratify on `labels`:

```python
# Errors because labels has shape (41564, 300) and can not be used to stratify
train_test_split(
    signals, labels, test_size=0.15, random_state=9, stratify=labels
)
```

In general, stratify does not work with labels shaped as 2D.

Labels: Bug, Needs Triage