scikit-learn/scikit-learn — pull request #2876 by Manoj-Kumar-S (2014-02-19 17:31:15+00:00)
Title: FIX: sample_weight='auto' for RidgeClassifier

Nothing great, I came across this bug, while playing with the class_weights option for MultinomialLR. I don't know if there is an issue already for this.

In master

X = np.array([[-1.0, -1.0], [-1.0, 0], [-.8, -1.0], [1.0, 1.0]])
y = np.array([1, 1, -1, -1])
clfa = RidgeClassifier(class_weight='auto')
clfa.fit(X, y)
ValueError: object too deep for desired array

This fixes this.