s / shape = / .reshape() /

This commit is contained in:
Paolo Losi 2011-04-12 22:30:54 +02:00
parent e034f09dd4
commit bda15f53ee
2 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ class LogisticRegression(BaseLibLinear, ClassifierMixin,
_y = np.empty(y.shape)
_y[np.where(y == classes[0])] = -1
_y[np.where(y == classes[1])] = 1
_y.shape = (1, np.size(y))
_y = _y.reshape((1, -1))
den = np.max(np.abs(np.dot(_y, X)))
if den == 0.0:

View File

@ -154,7 +154,7 @@ class LogisticRegression(SparseBaseLibLinear, ClassifierMixin,
_y = np.empty(y.shape)
_y[np.where(y == classes[0])] = -1
_y[np.where(y == classes[1])] = 1
_y.shape = (1, np.size(y))
_y = _y.reshape((1, -1))
den = np.max(np.abs(_y * X))
if den == 0.0: