scikit-learn/scikit-learn — pull request #2015 by arjoly (2013-05-29 12:27:27+00:00)
Title: [MRG] FIX corner cases with `unique_labels`

Bugs were discovered in `unique_labels` in #1985:
- Mix of multilabel / multiclass format doesn't raise any errors
- Mix of input data doesn't raise any error (e.g. [1, 2] and ["a"])
- Mix of indicator matrix with different number of labels doesn't raise
any error.

In my opinion, the implementation could be greatly simplify and improve using `type_of_target` in #1985 (see https://gist.github.com/arjoly/5665632).

However this pr is not merged yet .