`SimpleImputer().transform` on empty array raises `ValueError: Found array with 0 sample(s)`

### Describe the bug

I understand that the imputer requires at least one sample to fit. There is no reason for it not to return an empty array on `transform` though.

### Steps/Code to Reproduce

```python
import numpy as np
from sklearn.impute import SimpleImputer

X_train = np.array([[1, 2], [np.nan, 3], [7, 6]])
imp = SimpleImputer()
imp.fit(X_train)

X_test = X_train[:0, :]
X_test = imp.transform(X_test)
```

### Expected Results

An empty array of shape `(0, n_features)`.

### Actual Results

```
  File "/cluster/home/lmalte/code/tmp.py", line 10, in <module>
    X_test = imp.transform(X_test)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/cluster/home/lmalte/nobackup/mambaforge/envs/icu/lib/python3.12/site-packages/sklearn/utils/_set_output.py", line 316, in wrapped
    data_to_wrap = f(self, X, *args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cluster/home/lmalte/nobackup/mambaforge/envs/icu/lib/python3.12/site-packages/sklearn/impute/_base.py", line 570, in transform
    X = self._validate_input(X, in_fit=False)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cluster/home/lmalte/nobackup/mambaforge/envs/icu/lib/python3.12/site-packages/sklearn/impute/_base.py", line 350, in _validate_input
    raise ve
  File "/cluster/home/lmalte/nobackup/mambaforge/envs/icu/lib/python3.12/site-packages/sklearn/impute/_base.py", line 332, in _validate_input
    X = self._validate_data(
        ^^^^^^^^^^^^^^^^^^^^
  File "/cluster/home/lmalte/nobackup/mambaforge/envs/icu/lib/python3.12/site-packages/sklearn/base.py", line 633, in _validate_data
    out = check_array(X, input_name="X", **check_params)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cluster/home/lmalte/nobackup/mambaforge/envs/icu/lib/python3.12/site-packages/sklearn/utils/validation.py", line 1087, in check_array
    raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0, 2)) while a minimum of 1 is required by SimpleImputer.
```

### Versions

```shell
>>> import sklearn; sklearn.show_versions()

System:
    python: 3.12.7 | packaged by conda-forge | (main, Oct  4 2024, 16:05:46) [GCC 13.3.0]
executable: /cluster/home/lmalte/nobackup/mambaforge/envs/icu/bin/python
   machine: Linux-5.15.0-122-generic-x86_64-with-glibc2.35

Python dependencies:
      sklearn: 1.5.2
          pip: 24.3.1
   setuptools: 75.1.0
        numpy: 2.1.2
        scipy: 1.14.1
       Cython: None
       pandas: 2.2.3
   matplotlib: 3.9.2
       joblib: 1.4.2
threadpoolctl: 3.5.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 4
         prefix: libopenblas
       filepath: /cluster/home/lmalte/nobackup/mambaforge/envs/icu/lib/libopenblasp-r0.3.28.so
        version: 0.3.28
threading_layer: pthreads
   architecture: Haswell

       user_api: openmp
   internal_api: openmp
    num_threads: 4
         prefix: libgomp
       filepath: /cluster/home/lmalte/nobackup/mambaforge/envs/icu/lib/libgomp.so.1.0.0
        version: None
```
```

COMMENT:
My wide guess is that most of our estimators in scikit-learn expect a single sample even at transform. I don't see a specific `check` in the `estimator_check`.

@mlondschien Could you motivate in which case having an empty array is useful. My takes here would be that considering a `Pipeline` later or earlier stage (other transformers or predictors) will raise the same error. So I would be interested to understand how you would benefit from this feature.

Labels: Bug