Skip to content

Commit

Permalink
FIX: coef.shape
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Pedregosa authored and MechCoder committed Jul 22, 2014
1 parent 668e0d1 commit af6c7ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sklearn/linear_model/logistic.py
Expand Up @@ -588,10 +588,10 @@ def fit(self, X, y):
X, y, Cs=[self.C_], fit_intercept=self.fit_intercept,
coef=coef_init, solver=self.solver, max_iter=self.max_iter,
gtol=self.gtol, verbose=max(0, self.verbose - 1))
w = w[0][0]
w = w[0][0][:, np.newaxis].T
if self.fit_intercept:
self.coef_ = w[:-1]
self.intercept_ = w[-1]
self.coef_ = w[:, :-1]
self.intercept_ = w[:, -1]
else:
self.coef_ = w
self.intercept_ = 0
Expand Down

0 comments on commit af6c7ed

Please sign in to comment.