Issues with pairwise_distances(metric='euclidean') when used on the output of UMAP

### Describe the bug

When using pairwise_distances with metric='euclidean' on the output of some data from a UMAP, a `RuntimeWarning: divide by zero encountered in matmul ret = a @ b` is raised. This warning is not raised if you just use pairwise_distances on some normally distributed values of the same dimension, it specifically happens when used on the output of UMAP. The warning is not raised if calling `scipy.pdist` on the same data. The warning doesn't come up with any other metric (other than euclidean family e.g. nan_euclidean etc)

### Steps/Code to Reproduce

```python
import numpy as np
import umap.umap_ as umap 
from sklearn.metrics import pairwise_distances

np.random.seed(42)
arr = np.random.normal(size = (300, 10))
reducer = umap.UMAP()
embedding = reducer.fit_transform(arr)

# this line produces the warning 
dist_mat = pairwise_distances(embedding, metric = 'euclidean')

# no warning produced by this code
synthetic = np.random.normal(size = (300, 2))
dist_mat_synth = pairwise_distances(synthetic, metric = 'euclidean')
```

### Expected Results

Would expect to see no RuntimeWarning (FutureWarning is expected)

### Actual Results

``` 

[.../site-packages/sklearn/utils/deprecation.py:151]: FutureWarning: 'force_all_finite' was renamed to 'ensure_all_finite' in 1.6 and will be removed in 1.8.
  warnings.warn(
[.../site-packages/sklearn/utils/extmath.py:203] RuntimeWarning: divide by zero encountered in matmul
  ret = a @ b
[.../site-packages/sklearn/utils/extmath.py:203]: RuntimeWarning: overflow encountered in matmul
  ret = a @ b
[.../site-packages/sklearn/utils/extmath.py:203]: RuntimeWarning: invalid value encountered in matmul
  ret = a @ b

```

### Versions

```shell
System:
    python: 3.10.16 (main, Feb 25 2025, 09:29:51) [Clang 16.0.0 (clang-1600.0.26.6)]
executable: .../bin/python
   machine: macOS-15.4-arm64-arm-64bit

Python dependencies:
      sklearn: 1.6.1
          pip: 25.0.1
   setuptools: 65.5.0
        numpy: 2.1.3
        scipy: 1.15.1
       Cython: None
       pandas: 2.2.3
   matplotlib: 3.10.0
       joblib: 1.4.2
threadpoolctl: 3.5.0

Built with OpenMP: True

threadpoolctl info:
       user_api: openmp
   internal_api: openmp
    num_threads: 14
         prefix: libomp
       filepath: .../site-packages/sklearn/.dylibs/libomp.dylib
        version: None

       user_api: openmp
   internal_api: openmp
    num_threads: 14
         prefix: libomp
       filepath: /opt/homebrew/Cellar/libomp/19.1.7/lib/libomp.dylib
        version: None
```

COMMENT:
I suspect that this depends on the BLAS implementation. From the output of `sklearn.show_versions()` that includes the output of `python -m threadpoolctl -i numpy -i scipy.linalg`, I suspect that @griffinfarrow's environment is based on macOS' Accelerate implementation instead of OpenBLAS (Accelerate cannot be detected by threadpoolctl as of today).


However, I also tried on macOS where I have an Accelerate-based environment handy and I cannot reproduce either (no matmul related warnings when running the reproducer). Here are the details of my BLAS env:

```
dev ❯ python -m threadpoolctl -i scipy.linalg -i sklearn.metrics -i umap
[
  {
    "user_api": "openmp",
    "internal_api": "openmp",
    "num_threads": 8,
    "prefix": "libomp",
    "filepath": "/Users/ogrisel/miniforge3/envs/dev/lib/libomp.dylib",
    "version": null
  }
]


dev ❯ conda list blas
# packages in environment at /Users/ogrisel/miniforge3/envs/dev:
#
# Name                    Version                   Build  Channel
libblas                   3.9.0           31_h504e6c8_accelerate    conda-forge
libcblas                  3.9.0           31_h8d39bcd_accelerate    conda-forge
libopenblas               0.3.28          openmp_hf332438_1    conda-forge
dev ❯ python -c "import sklearn; sklearn.show_versions()"

System:
    python: 3.10.17 | packaged by conda-forge | (main, Apr 10 2025, 22:23:34) [Clang 18.1.8 ]
executable: /Users/ogrisel/miniforge3/envs/py310/bin/python
   machine: macOS-15.2-arm64-arm-64bit

Python dependencies:
      sklearn: 1.6.1
          pip: 25.0.1
   setuptools: 79.0.1
        numpy: 2.2.5
        scipy: 1.15.2
       Cython: None
       pandas: None
   matplotlib: None
       joblib: 1.4.2
threadpoolctl: 3.6.0

Built with OpenMP: True

threadpoolctl info:
       user_api: openmp
   internal_api: openmp
    num_threads: 8
         prefix: libomp
       filepath: /Users/ogrisel/miniforge3/envs/py310/lib/libomp.dylib
        version: None
```

When using conda-forge, it's possible to switch the activate BLAS implementation using the following commands:

https://conda-forge.org/docs/maintainer/knowledge_base/#switching-blas-implementation

Labels: Bug, Needs Investigation