scikit-learn/scikit-learn — Issue #652: linear regression coefficients of inconsistent shape
Author: benjaminwilson
Created: 2012-02-24 17:38:02+00:00
State: open

Shape of output coefficient arrays are of varying *dimension*.

```python
from sklearn.linear_model import LinearRegression
X2 = array([[ 0.38349978, 0.61650022],
[ 0.58853682, 0.41146318]])
X3 = array([[ 0.27677969, 0.70693172, 0.01628859],
[ 0.08385139, 0.20692515, 0.70922346]])
Y = array([1,1])

lr2 = LinearRegression(fit_intercept=False).fit(X2,Y)
lr3 = LinearRegression(fit_intercept=False).fit(X3,Y)
lr2.coef_.shape #(2,)
lr3.coef_.shape #(3, 1)

```