I think we should raise a `ValueError` is `sample_weight.shape > 1` instead of calling ravel. I do not see any valid case for higher than 1D `sample_weight`.