Skip to content

Commit

Permalink
Merge pull request scikit-learn#3573 from MechCoder/high_dimensional_…
Browse files Browse the repository at this point in the history
…enetcv

[MRG] FIX: Memory crashes for _alpha_grid in ENetCV
  • Loading branch information
larsmans committed Aug 18, 2014
2 parents 55cb591 + ca3ad7b commit 05aa804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn/linear_model/coordinate_descent.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _alpha_grid(X, y, Xy=None, l1_ratio=1.0, fit_intercept=True,
# since we should not destroy the sparsity of such matrices.
_, _, X_mean, _, X_std = sparse_center_data(X, y, fit_intercept,
normalize)
mean_dot = np.sum(X_mean[:, np.newaxis] * y, axis=1)
mean_dot = X_mean * np.sum(y)

if Xy.ndim == 1:
Xy = Xy[:, np.newaxis]
Expand Down

0 comments on commit 05aa804

Please sign in to comment.