ValueError: Only sparse matrices with 32-bit integer indices are accepted.

### Describe the workflow you want to enable

The use case that triggers the issue is very simple. I am trying to compute the n-gram features of a tokenized 1M dataset (i.e., from List[str] to List[int]) and then perform clustering on the dataset based on these features.

```python
vectorizer = HashingVectorizer(ngram_range=(1, 5), alternate_sign=False, norm='l1')

# multi processing
X_tfidf = parallel_transform(train_dataset, vectorizer, num_chunks=64)

cluster_func = BisectingKMeans(n_clusters=num_clusters,random_state=42,bisecting_strategy="largest_cluster")
cluster_func.fit(X_tfidf)

```
However, as the n-gram size or the dataset increases, it is easy to encounter the error shown in the title.

```bash
Traceback (most recent call last):
13:50:00.018   File "<frozen runpy>", line 198, in _run_module_as_main
13:50:00.019   File "<frozen runpy>", line 88, in _run_code
13:50:00.019   File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/INS/ruanjunhao04/ruanjunhao/ndp/ndp/marisa_onlyclm.py", line 432, in <module>
13:50:00.022     main()
13:50:00.022   File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/INS/ruanjunhao04/ruanjunhao/ndp/ndp/marisa_onlyclm.py", line 404, in main
13:50:00.023     clustered_data = ngram_split(train_dataset, max_dataset_size)
13:50:00.023                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13:50:00.023   File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/INS/ruanjunhao04/ruanjunhao/ndp/ndp/marisa_onlyclm.py", line 340, in ngram_split
13:50:00.024     kmeans.fit(X_tfidf)
13:50:00.024   File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/ruanjunhao04/env/rjh/lib/python3.12/site-packages/sklearn/base.py", line 1473, in wrapper
13:50:00.032     return fit_method(estimator, *args, **kwargs)
13:50:00.032            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13:50:00.032   File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/ruanjunhao04/env/rjh/lib/python3.12/site-packages/sklearn/cluster/_kmeans.py", line 2073, in fit
13:50:00.037     X = self._validate_data(
13:50:00.037         ^^^^^^^^^^^^^^^^^^^^
13:50:00.037   File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/ruanjunhao04/env/rjh/lib/python3.12/site-packages/sklearn/base.py", line 633, in _validate_data
13:50:00.037     out = check_array(X, input_name="X", **check_params)
13:50:00.037           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13:50:00.038   File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/ruanjunhao04/env/rjh/lib/python3.12/site-packages/sklearn/utils/validation.py", line 971, in check_array
13:50:00.041     array = _ensure_sparse_format(
13:50:00.041             ^^^^^^^^^^^^^^^^^^^^^^
13:50:00.041   File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/ruanjunhao04/env/rjh/lib/python3.12/site-packages/sklearn/utils/validation.py", line 591, in _ensure_sparse_format
13:50:00.041     _check_large_sparse(sparse_container, accept_large_sparse)
13:50:00.041   File "/mnt/dolphinfs/hdd_pool/docker/user/hadoop-aipnlp/ruanjunhao04/env/rjh/lib/python3.12/site-packages/sklearn/utils/validation.py", line 1145, in _check_large_sparse
13:50:00.042     raise ValueError(
13:50:00.042 ValueError: Only sparse matrices with 32-bit integer indices are accepted. Got int64 indices. Please do report a minimal reproducer on scikit-learn issue tracker so that support for your use-case can be studied by maintainers. See: https://scikit-learn.org/dev/developers/minimal_reproducer.html

```

COMMENT:
You can also preprocess the data incrementally to reduce it's dimensionality using `IncrementalPCA` that also supports `partial_fit` although it might not be very efficient on sparse data.

Labels: New Feature, Needs Reproducible Code