Talip7/scikit-learn-issues-multilabel huggingface dataset:
Incorrect warning about data conversion when using `pairwise_distances_argmin` with `jaccard` and bool arrays

### Describe the bug

When using `pairwise_distances_argmin` with the `jaccard` metric, sklearn warns of data conversion even when both input arrays are of `dtype=np.bool`



### Steps/Code to Reproduce

```python
import numpy as np
from sklearn.metrics import pairwise_distances_argmin
x = np.ones((10, 10), dtype=np.bool)
y = np.ones((10, 10), dtype=np.bool)
argmin = pairwise_distances_argmin(x, y, metric="jaccard")
```

### Expected Results

No such warning should be emitted

### Actual Results

The following warning is emitted:
```
sklearn/metrics/pairwise.py:2462: DataConversionWarning: Data was converted to boolean for metric jaccard
  warnings.warn(msg, DataConversionWarning)
```

### Versions

```shell
System:
    python: 3.11.13 | packaged by conda-forge | (main, Jun  4 2025, 14:48:23) [GCC 13.3.0]
executable: /home/ipickering/Conda/envs/bblean/bin/python
   machine: Linux-6.14.0-33-generic-x86_64-with-glibc2.39

Python dependencies:
      sklearn: 1.7.2
          pip: 25.2
   setuptools: 80.9.0
        numpy: 2.3.0
        scipy: 1.16.2
       Cython: None
       pandas: 2.3.2
   matplotlib: 3.10.6
       joblib: 1.5.2
threadpoolctl: 3.6.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 12
         prefix: libopenblas
       filepath: /home/ipickering/Conda/envs/bblean/lib/libopenblasp-r0.3.30.so
        version: 0.3.30
threading_layer: pthreads
   architecture: Zen

       user_api: openmp
   internal_api: openmp
    num_threads: 12
         prefix: libgomp
       filepath: /home/ipickering/Conda/envs/bblean/lib/libgomp.so.1.0.0
        version: None
```

COMMENT:
That sounds great, thanks! Interesting, I thought this did not happen for me when calling `pairwise_distances` directly, but I may be mistaken.

Labels: Bug
Incorrect warning about data conversion when using `pairwise_distances_argmin` with `jaccard` and bool arrays

### Describe the bug

When using `pairwise_distances_argmin` with the `jaccard` metric, sklearn warns of data conversion even when both input arrays are of `dtype=np.bool`



### Steps/Code to Reproduce

```python
import numpy as np
from sklearn.metrics import pairwise_distances_argmin
x = np.ones((10, 10), dtype=np.bool)
y = np.ones((10, 10), dtype=np.bool)
argmin = pairwise_distances_argmin(x, y, metric="jaccard")
```

### Expected Results

No such warning should be emitted

### Actual Results

The following warning is emitted:
```
sklearn/metrics/pairwise.py:2462: DataConversionWarning: Data was converted to boolean for metric jaccard
  warnings.warn(msg, DataConversionWarning)
```

### Versions

```shell
System:
    python: 3.11.13 | packaged by conda-forge | (main, Jun  4 2025, 14:48:23) [GCC 13.3.0]
executable: /home/ipickering/Conda/envs/bblean/bin/python
   machine: Linux-6.14.0-33-generic-x86_64-with-glibc2.39

Python dependencies:
      sklearn: 1.7.2
          pip: 25.2
   setuptools: 80.9.0
        numpy: 2.3.0
        scipy: 1.16.2
       Cython: None
       pandas: 2.3.2
   matplotlib: 3.10.6
       joblib: 1.5.2
threadpoolctl: 3.6.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 12
         prefix: libopenblas
       filepath: /home/ipickering/Conda/envs/bblean/lib/libopenblasp-r0.3.30.so
        version: 0.3.30
threading_layer: pthreads
   architecture: Zen

       user_api: openmp
   internal_api: openmp
    num_threads: 12
         prefix: libgomp
       filepath: /home/ipickering/Conda/envs/bblean/lib/libgomp.so.1.0.0
        version: None
```

COMMENT:
Thanks for the reply! After reading your comment, I went back to do some deeper debugging and discovered that a direct call to `pairwise_distances` does not trigger the warning.

The issue is more subtle I first realized. By adding print statements to the source code, I discovered that `pairwise_distances_argmin` is converting the boolean arrays to `float64` before passing them on. So, the warning from `pairwise_distances` is actually correct given the float data it receives. The real root cause is the unnecessary data type conversion happening inside `pairwise_distances_argmin`.

My apologies for the premature conclusion earlier! I'm now focusing my efforts on finding and fixing the source of that float64 conversion in `pairwise_distances_argmin`. I'll post another update when I have a fix.

Labels: Bug
Incorrect warning about data conversion when using `pairwise_distances_argmin` with `jaccard` and bool arrays

### Describe the bug

When using `pairwise_distances_argmin` with the `jaccard` metric, sklearn warns of data conversion even when both input arrays are of `dtype=np.bool`



### Steps/Code to Reproduce

```python
import numpy as np
from sklearn.metrics import pairwise_distances_argmin
x = np.ones((10, 10), dtype=np.bool)
y = np.ones((10, 10), dtype=np.bool)
argmin = pairwise_distances_argmin(x, y, metric="jaccard")
```

### Expected Results

No such warning should be emitted

### Actual Results

The following warning is emitted:
```
sklearn/metrics/pairwise.py:2462: DataConversionWarning: Data was converted to boolean for metric jaccard
  warnings.warn(msg, DataConversionWarning)
```

### Versions

```shell
System:
    python: 3.11.13 | packaged by conda-forge | (main, Jun  4 2025, 14:48:23) [GCC 13.3.0]
executable: /home/ipickering/Conda/envs/bblean/bin/python
   machine: Linux-6.14.0-33-generic-x86_64-with-glibc2.39

Python dependencies:
      sklearn: 1.7.2
          pip: 25.2
   setuptools: 80.9.0
        numpy: 2.3.0
        scipy: 1.16.2
       Cython: None
       pandas: 2.3.2
   matplotlib: 3.10.6
       joblib: 1.5.2
threadpoolctl: 3.6.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 12
         prefix: libopenblas
       filepath: /home/ipickering/Conda/envs/bblean/lib/libopenblasp-r0.3.30.so
        version: 0.3.30
threading_layer: pthreads
   architecture: Zen

       user_api: openmp
   internal_api: openmp
    num_threads: 12
         prefix: libgomp
       filepath: /home/ipickering/Conda/envs/bblean/lib/libgomp.so.1.0.0
        version: None
```

COMMENT:
Thanks, @IgnacioJPickering and @pushkar-hue for the report and root cause analysis. I confirm I can also reproduce the bug in `main`. Let me review your PRs.

Labels: Bug
⚠️ CI failed on Wheel builder (last failure: Oct 13, 2025) ⚠️

**CI failed on [Wheel builder](https://github.com/scikit-learn/scikit-learn/actions/runs/18454580283)** (Oct 13, 2025)

COMMENT:
Intermittent network error when trying to download the openmp package:
```
+ OPENMP_URL=https://anaconda.org/conda-forge/llvm-openmp/11.1.0/download/osx-arm64/llvm-openmp-11.1.0-hf3c4609_1.tar.bz2
+ conda create -n build https://anaconda.org/conda-forge/llvm-openmp/11.1.0/download/osx-arm64/llvm-openmp-11.1.0-hf3c4609_1.tar.bz2
```

```
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://anaconda.org/conda-forge/llvm-openmp/11.1.0/download/osx-arm64/llvm-openmp-11.1.0-hf3c4609_1.tar.bz2>
```

Labels: Needs Triage
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
Hi @lesteve! I'd like to work on this.

Just to clarify - should this be in install.rst or the developer docs? And should I check #32343 for specific issues to address?

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
Hi @lesteve   I'd like to work on this issue. 

I'll create a linear development setup guide similar to the installation page, using the tab structure to make it easy for new contributors to follow step-by-step without jumping between sections.

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
Hi, I would like to work on this issue.

Having recently gone through the development setup process myself, I have a fresh perspective on the challenges and agree that a more linear guide would be very helpful. I've read the discussion and understand the goal is to refactor the documentation to be a clear, step-by-step guide.

Can you please assign this to me?"

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
@dipak0000812 @Nitin-Prata @Ravichandranayakar this issue was created with @AnneBeyer in mind.

Great if you want to contribute to scikit-learn, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Out of curiosity how did you find this issue?
- automation of some kind (please add more details 🙏) that looks at recently opened issues
- some websites like that help you find issues to work on like https://up-for-grabs.net/ or https://goodfirstissue.dev
- browsing manually the scikit-learn issue tracker? I would find it a bit weird that 3 people saw the same issue but it's always a possibility 🤔 ...

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
Hi @lesteve! I found this issue by browsing the scikit-learn issue tracker manually. I was looking for beginner-friendly issues to work on and saw #32315 which seemed like a good fit for learning. I apologize if I misunderstood - I didn't realize this was created specifically for someone else. 

I'm happy to look at the "Issues for new contributors" section you mentioned and find more appropriate tasks. Thanks for the guidance!

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
Hi @lesteve, thank you for the reply.

To answer your question, I found this issue by manually browsing the 'Documentation' label on the issue tracker.

If it's okay, I would like to work on this. Could you please assign it to me?

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
> If it's okay, I would like to work on this. Could you please assign it to me?

@Ravichandranayakar no, it's not OK, as I said, this issue was meant for @AnneBeyer. I edited the issue description to make this clearer.

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
I'm working on this.

Labels: Documentation
DOC Clearer linear "get your development environment" setup documentation

> [!NOTE]
> This issue was opened with @AnneBeyer in mind. If you are looking for an issue to work on, please have a look at our [contributing doc](https://scikit-learn.org/dev/developers/contributing.html) and in particular the section [Issues for new contributors](https://scikit-learn.org/dev/developers/contributing.html#new-contributors).

Related to the discussion in https://github.com/scikit-learn/scikit-learn/pull/32343.

I think one useful thing that is easier than restructuring the doc would be to have a linear "get your development environment set-up" similar to https://scikit-learn.org/dev/install.html#installing-the-latest-release that you can easily follow step by step. That would replace the ["Building from source" section](https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source).

Right now you need to go back and forth between different places of the doc which is less than ideal. You would be able to chose your OS and conda vs pip and you would get something that you can follow step by step.

See rst code for the installing doc: https://github.com/scikit-learn/scikit-learn/blob/main/doc/install.rst?plain=1#L28. From a cursory look, it looks like this is using tabs and some include in a few places to share some content. 

cc @AnneBeyer in case you find this interesting to work on and @StefanieSenger with whom I had a quick chat about this topic.

Don't hesitate if you need clarifications!

COMMENT:
Hi everyone, 

let's have @AnneBeyer work on this. The problem is there is not so much work for people starting out on scikit-learn and too many issues and tasks are long runners and complicated to see what this is about. If you are having trouble finding something to work on, you can go back on previous PRs and see if you can finish an old one that had been approved by maintainers but that had gone stale. That's not necessarily easy and will take weeks of work, but that's something you can work on without time pressure. Please just make sure not to push generated code that you don't understand yourself.

Labels: Documentation