[MRG] FIX for exception thrown when y does not have all classes

This is a fix for #3581
@MechCoder your solution would still give the warning. We can either turn the warning off explicitly, or do

```python
# At least 1 to prevent zero division for non-occurring labels (not used anyway).
recip_freq = 1. / np.maximum(1, np.bincount(y_ind))
```