| 1 | regression in input validation of clustering metrics |
| 2 | ```python |
| 3 | from sklearn.metrics.cluster import mutual_info_score |
| 4 | import numpy as np |
| 5 | |
| 6 | x = np.random.choice(['a', 'b'], size=20).astype(object) |
| 7 | mutual_info_score(x, x) |
| 8 | ``` |
| 9 | ValueError: could not convert string to float: 'b' |
| 10 | |
| 11 | while |
| 12 | ```python |
| 13 | x = np.random.choice(['a', 'b'], size=20) |
| 14 | mutual_info_score(x, x) |
| 15 | ``` |
| 16 | works with a warning? |
| 17 | |
| 18 | this worked in 0.21.1 without a warning (as I think it should) |
| 19 | |
| 20 | |
| 21 | Edit by @ogrisel: I removed the `.astype(object)` in the second code snippet. |