MinMaxScaler is not array API compliant if clip=True

### Describe the bug

The `MinMaxScaler` is [listed](https://github.com/scikit-learn/scikit-learn/blob/21e1642b0b47475ffd476c9df6c9984d71b90b1d/doc/modules/array_api.rst#estimators) as array API compliant, but uses non compliant code under some configuration. Namely, it [calls](https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/preprocessing/_data.py#L540) `clip` ([link](https://data-apis.org/array-api/draft/API_specification/generated/array_api.clip.html#clip) to standard) with the non-standard `out` kwarg [here](https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/preprocessing/_data.py#L540).

While this particular fix may be simple, I am a bit unsure how to best test for array API compliance. The `array-api-strict` package is only implemented up to version `2022.12` of the standard which didn't include `clip` yet. I actually discovered the bug using the lazy [`ndonnx`](https://github.com/Quantco/ndonnx/tree/main/ndonnx) package, but it does not serve well as a reproducer here since I also run into other, earlier, issues related to eager data validation.

### Steps/Code to Reproduce

```python
from sklearn.preprocessing import MinMaxScaler
import array_api_strict as xp
import numpy as np
import sklearn

def test_minmax_scaler_clip():
    feature_range = (0, 1)
    # test behaviour of the parameter 'clip' in MinMaxScaler
    # X = iris.data
    X = np.array([[-1, 2], [-0.5, 6], [0, 10], [1, 18]])
    scaler = MinMaxScaler(feature_range=feature_range, clip=True).fit(X)
    X_min, X_max = np.min(X, axis=0), np.max(X, axis=0)
    X_test = xp.asarray([np.r_[X_min[:2] - 10, X_max[2:] + 10]])
    X_transformed = scaler.transform(X_test)


with sklearn.config_context(array_api_dispatch=True):
    test_minmax_scaler_clip()
```

### Expected Results

I expected that `MinMaxScaler.transform` would just work with a standard compliant implementation.

### Actual Results

The `array-api-strict` package is lagging behind and fails with the notice that `clip` is not implemented, yet.
```
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[6], line 2
      1 with sklearn.config_context(array_api_dispatch=True):
----> 2     test_minmax_scaler_clip()

Cell In[5], line 9, in test_minmax_scaler_clip()
      7 X_min, X_max = np.min(X, axis=0), np.max(X, axis=0)
      8 X_test = xp.asarray([np.r_[X_min[:2] - 10, X_max[2:] + 10]])
----> 9 X_transformed = scaler.transform(X_test)

File [~/micromamba/envs/strict-array-api/lib/python3.12/site-packages/sklearn/utils/_set_output.py:313](http://localhost:8889/lab/tree/~/micromamba/envs/strict-array-api/lib/python3.12/site-packages/sklearn/utils/_set_output.py#line=312), in _wrap_method_output.<locals>.wrapped(self, X, *args, **kwargs)
    311 @wraps(f)
    312 def wrapped(self, X, *args, **kwargs):
--> 313     data_to_wrap = f(self, X, *args, **kwargs)
    314     if isinstance(data_to_wrap, tuple):
    315         # only wrap the first output for cross decomposition
    316         return_tuple = (
    317             _wrap_data_with_container(method, data_to_wrap[0], X, self),
    318             *data_to_wrap[1:],
    319         )

File [~/micromamba/envs/strict-array-api/lib/python3.12/site-packages/sklearn/preprocessing/_data.py:546](http://localhost:8889/lab/tree/~/micromamba/envs/strict-array-api/lib/python3.12/site-packages/sklearn/preprocessing/_data.py#line=545), in MinMaxScaler.transform(self, X)
    544 X += self.min_
    545 if self.clip:
--> 546     xp.clip(X, self.feature_range[0], self.feature_range[1], out=X)
    547 return X

File [~/micromamba/envs/strict-array-api/lib/python3.12/site-packages/array_api_strict/_flags.py:355](http://localhost:8889/lab/tree/~/micromamba/envs/strict-array-api/lib/python3.12/site-packages/array_api_strict/_flags.py#line=354), in requires_api_version.<locals>.decorator.<locals>.wrapper(*args, **kwargs)
    352 @functools.wraps(func)
    353 def wrapper(*args, **kwargs):
    354     if version > API_VERSION:
--> 355         raise RuntimeError(
    356             f"The function {func.__name__} requires API version {version} or later, "
    357             f"but the current API version for array-api-strict is {API_VERSION}"
    358         )
    359     return func(*args, **kwargs)

RuntimeError: The function clip requires API version 2023.12 or later, but the current API version for array-api-strict is 2022.12
```

### Versions

```shell
System:
    python: 3.12.4 | packaged by conda-forge | (main, Jun 17 2024, 10:13:44) [Clang 16.0.6 ]
executable: /Users/c.bourjau/micromamba/envs/strict-array-api/bin/python
   machine: macOS-14.2.1-arm64-arm-64bit

Python dependencies:
      sklearn: 1.5.1
          pip: 24.2
   setuptools: 71.0.4
        numpy: 2.0.1
        scipy: 1.14.0
       Cython: None
       pandas: None
   matplotlib: None
       joblib: 1.4.2
threadpoolctl: 3.5.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 8
         prefix: libopenblas
       filepath: /Users/c.bourjau/micromamba/envs/strict-array-api/lib/libopenblas.0.dylib
        version: 0.3.27
threading_layer: openmp
   architecture: VORTEX

       user_api: openmp
   internal_api: openmp
    num_threads: 8
         prefix: libomp
       filepath: /Users/c.bourjau/micromamba/envs/strict-array-api/lib/libomp.dylib
        version: None
```

COMMENT:
@cbourjau I guess to address this, the clip function call in MinMaxScaler needs to be made compatible with the array API standard. Specifically, avoid using the out keyword, which is not part of the array API specification.
1. Modify the call to clip within the MinMaxScaler to avoid using the out keyword. Instead, reassign the result to X.
```
# Current code that may cause the issue:
# xp.clip(X, self.feature_range[0], self.feature_range[1], out=X)

# Proposed fix:
X = xp.clip(X, self.feature_range[0], self.feature_range[1])
```
2. Testing for Array API Compliance:- To ensure array API compliance, you can use the array-api-tests package and run tests against your code. 

By making the MinMaxScaler array API compliant, we can check that it works correctly with strict array API implementations, thereby improving its compatibility across different array libraries.

Hope this helps, Thanks

Labels: Bug, module:preprocessing, Array API