PyTorch tensor failed with SVM

### Describe the bug

PyTorch tensor failed with SVM: `TypeError: asarray(): argument 'dtype' must be torch.dtype, not type`

### Steps/Code to Reproduce

```python
import torch
from sklearn import config_context
from sklearn.svm import SVC
from sklearn.datasets import make_classification
from sklearn.metrics import accuracy_score

X_torch = torch.randn(100, 4, dtype=torch.float32)
y_torch = torch.randint(0, 2, (100,), dtype=torch.int32)

print(f"输入数据形状: {X_torch.shape}")
print(f"标签数据形状: {y_torch.shape}")
print(f"输入数据类型: {X_torch.dtype}")
print(f"标签数据类型: {y_torch.dtype}")

with config_context(array_api_dispatch=True):
    svm = SVC(kernel='linear', random_state=42)
    svm.fit(X_torch, y_torch)
    

    y_pred = svm.predict(X_torch)
    
    accuracy = accuracy_score(y_torch.cpu().numpy(), y_pred)
    print(f"SVM 准确率: {accuracy:.4f}")
    
    print(f"支持向量数量: {len(svm.support_vectors_)}")
    print(f"模型参数形状: {svm.coef_.shape if hasattr(svm, 'coef_') else 'No coefficients'}")
```

### Expected Results

No error is thrown.

### Actual Results

```
输入数据形状: torch.Size([100, 4])
标签数据形状: torch.Size([100])
输入数据类型: torch.float32
标签数据类型: torch.int32
Traceback (most recent call last):
  File "/mnt/workspace/scikit-learn/bug.py", line 19, in <module>
    svm.fit(X_torch, y_torch)
  File "/mnt/workspace/scikit-learn/sklearn/base.py", line 1373, in wrapper
    return fit_method(estimator, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/workspace/scikit-learn/sklearn/svm/_base.py", line 205, in fit
    X, y = validate_data(
           ^^^^^^^^^^^^^^
  File "/mnt/workspace/scikit-learn/sklearn/utils/validation.py", line 3024, in validate_data
    X, y = check_X_y(X, y, **check_params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/workspace/scikit-learn/sklearn/utils/validation.py", line 1383, in check_X_y
    X = check_array(
        ^^^^^^^^^^^^
  File "/mnt/workspace/scikit-learn/sklearn/utils/validation.py", line 1068, in check_array
    array = _asarray_with_order(array, order=order, dtype=dtype, xp=xp)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/workspace/scikit-learn/sklearn/utils/_array_api.py", line 815, in _asarray_with_order
    return xp.asarray(array, dtype=dtype, copy=copy, device=device)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/workspace/scikit-learn/sklearn/externals/array_api_compat/torch/_aliases.py", line 214, in asarray
    return torch.asarray(obj, dtype=dtype, device=device, copy=copy, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: asarray(): argument 'dtype' must be torch.dtype, not type
```

### Versions

```shell
System:
    python: 3.11.11 (main, Mar 11 2025, 18:25:39) [GCC 11.4.0]
executable: /usr/local/bin/python
   machine: Linux-4.19.91-012.ali4000.alios7.x86_64-x86_64-with-glibc2.35

Python dependencies:
      sklearn: 1.8.dev0
          pip: 25.2
   setuptools: 65.5.1
        numpy: 1.26.4
        scipy: 1.16.1
       Cython: 3.1.3
       pandas: 2.2.3
   matplotlib: 3.10.5
       joblib: 1.4.2
threadpoolctl: 3.5.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 64
         prefix: libopenblas
       filepath: /usr/local/lib/python3.11/site-packages/numpy.libs/libopenblas64_p-r0-0cf96a72.3.23.dev.so
        version: 0.3.23.dev
threading_layer: pthreads
   architecture: SkylakeX

       user_api: blas
   internal_api: openblas
    num_threads: 64
         prefix: libscipy_openblas
       filepath: /usr/local/lib/python3.11/site-packages/scipy.libs/libscipy_openblas-68440149.so
        version: 0.3.28
threading_layer: pthreads
   architecture: SkylakeX

       user_api: openmp
   internal_api: openmp
    num_threads: 64
         prefix: libgomp
       filepath: /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0
        version: None
```

COMMENT:
Thanks for reporting this issue, @MengAiDev, and for helping to improve scikit-learn.

Support vector machines in scikit-learn do not support the Array API yet, see our [documentation](https://scikit-learn.org/stable/modules/array_api.html#support-for-array-api-compatible-inputs) for details.

With that said, I'm closing this issue.

Labels: module:svm, Array API