{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/24491643","id":24491643,"diff_hunk":"@@ -92,16 +92,23 @@ def _alpha_grid(X, y, Xy=None, l1_ratio=1.0, fit_intercept=True,\n \n     if Xy.ndim == 1:\n         Xy = Xy[:, np.newaxis]\n+\n     if sparse_center:\n         if fit_intercept:\n             Xy -= mean_dot[:, np.newaxis]\n         if normalize:\n             Xy /= X_std[:, np.newaxis]\n+\n     alpha_max = (np.sqrt(np.sum(Xy ** 2, axis=1)).max() /\n                  (n_samples * l1_ratio))\n-    alphas = np.logspace(np.log10(alpha_max * eps), np.log10(alpha_max),\n-                         num=n_alphas)[::-1]\n-    return alphas\n+\n+    if alpha_max == 0:","path":"sklearn/linear_model/coordinate_descent.py","position":28,"original_position":28,"commit_id":"452bc124c17b5f462466e0a5b4450d9aabd1e876","original_commit_id":"452bc124c17b5f462466e0a5b4450d9aabd1e876","user":{"login":"agramfort","id":161052,"avatar_url":"https://avatars.githubusercontent.com/u/161052?v=3","gravatar_id":"","url":"https://api.github.com/users/agramfort","html_url":"https://github.com/agramfort","followers_url":"https://api.github.com/users/agramfort/followers","following_url":"https://api.github.com/users/agramfort/following{/other_user}","gists_url":"https://api.github.com/users/agramfort/gists{/gist_id}","starred_url":"https://api.github.com/users/agramfort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agramfort/subscriptions","organizations_url":"https://api.github.com/users/agramfort/orgs","repos_url":"https://api.github.com/users/agramfort/repos","events_url":"https://api.github.com/users/agramfort/events{/privacy}","received_events_url":"https://api.github.com/users/agramfort/received_events","type":"User","site_admin":false},"body":"if alpha_max < np.finfo(float).min:\r\n\r\nwould be cleaner.","created_at":"2015-02-11T12:35:18Z","updated_at":"2015-02-11T12:35:18Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4226#discussion_r24491643","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4226","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/24491643"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4226#discussion_r24491643"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4226"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4226","id":28908460,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/4226","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/4226.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/4226.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4226","number":4226,"state":"open","locked":false,"title":"[MRG] Handle numerical instability in ElasticNetCV","user":{"login":"ragv","id":9487348,"avatar_url":"https://avatars.githubusercontent.com/u/9487348?v=3","gravatar_id":"","url":"https://api.github.com/users/ragv","html_url":"https://github.com/ragv","followers_url":"https://api.github.com/users/ragv/followers","following_url":"https://api.github.com/users/ragv/following{/other_user}","gists_url":"https://api.github.com/users/ragv/gists{/gist_id}","starred_url":"https://api.github.com/users/ragv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ragv/subscriptions","organizations_url":"https://api.github.com/users/ragv/orgs","repos_url":"https://api.github.com/users/ragv/repos","events_url":"https://api.github.com/users/ragv/events{/privacy}","received_events_url":"https://api.github.com/users/ragv/received_events","type":"User","site_admin":false},"body":"Fixes #4224 \r\n\r\n- [x] Return a 0 array of size `n_alphas` when the maximum alpha is 0\r\n- [x] Add NRT\r\n\r\n@GaelVaroquaux does this seem like a reasonable fix?","created_at":"2015-02-09T10:10:31Z","updated_at":"2015-02-11T12:35:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"976593e6d3458849b80f85ee1488e7070d0c09e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4226/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4226/comments","review_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/{number}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4226/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/452bc124c17b5f462466e0a5b4450d9aabd1e876","head":{"label":"ragv:fix_4224","ref":"fix_4224","sha":"452bc124c17b5f462466e0a5b4450d9aabd1e876","user":{"login":"ragv","id":9487348,"avatar_url":"https://avatars.githubusercontent.com/u/9487348?v=3","gravatar_id":"","url":"https://api.github.com/users/ragv","html_url":"https://github.com/ragv","followers_url":"https://api.github.com/users/ragv/followers","following_url":"https://api.github.com/users/ragv/following{/other_user}","gists_url":"https://api.github.com/users/ragv/gists{/gist_id}","starred_url":"https://api.github.com/users/ragv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ragv/subscriptions","organizations_url":"https://api.github.com/users/ragv/orgs","repos_url":"https://api.github.com/users/ragv/repos","events_url":"https://api.github.com/users/ragv/events{/privacy}","received_events_url":"https://api.github.com/users/ragv/received_events","type":"User","site_admin":false},"repo":{"id":26038110,"name":"scikit-learn","full_name":"ragv/scikit-learn","owner":{"login":"ragv","id":9487348,"avatar_url":"https://avatars.githubusercontent.com/u/9487348?v=3","gravatar_id":"","url":"https://api.github.com/users/ragv","html_url":"https://github.com/ragv","followers_url":"https://api.github.com/users/ragv/followers","following_url":"https://api.github.com/users/ragv/following{/other_user}","gists_url":"https://api.github.com/users/ragv/gists{/gist_id}","starred_url":"https://api.github.com/users/ragv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ragv/subscriptions","organizations_url":"https://api.github.com/users/ragv/orgs","repos_url":"https://api.github.com/users/ragv/repos","events_url":"https://api.github.com/users/ragv/events{/privacy}","received_events_url":"https://api.github.com/users/ragv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ragv/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/ragv/scikit-learn","forks_url":"https://api.github.com/repos/ragv/scikit-learn/forks","keys_url":"https://api.github.com/repos/ragv/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ragv/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ragv/scikit-learn/teams","hooks_url":"https://api.github.com/repos/ragv/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/ragv/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/ragv/scikit-learn/events","assignees_url":"https://api.github.com/repos/ragv/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/ragv/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/ragv/scikit-learn/tags","blobs_url":"https://api.github.com/repos/ragv/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ragv/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ragv/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/ragv/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ragv/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/ragv/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/ragv/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/ragv/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/ragv/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/ragv/scikit-learn/subscription","commits_url":"https://api.github.com/repos/ragv/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/ragv/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/ragv/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/ragv/scikit-learn/issues/comments/{number}","contents_url":"https://api.github.com/repos/ragv/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/ragv/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ragv/scikit-learn/merges","archive_url":"https://api.github.com/repos/ragv/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ragv/scikit-learn/downloads","issues_url":"https://api.github.com/repos/ragv/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/ragv/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/ragv/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/ragv/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ragv/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/ragv/scikit-learn/releases{/id}","created_at":"2014-11-01T00:56:31Z","updated_at":"2015-02-11T01:13:27Z","pushed_at":"2015-02-11T12:31:43Z","git_url":"git://github.com/ragv/scikit-learn.git","ssh_url":"git@github.com:ragv/scikit-learn.git","clone_url":"https://github.com/ragv/scikit-learn.git","svn_url":"https://github.com/ragv/scikit-learn","homepage":"http://scikit-learn.org","size":60689,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scikit-learn:master","ref":"master","sha":"73e5cf5dbf6b84b0e8c6b9616bd80089ed38a039","user":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"repo":{"id":843222,"name":"scikit-learn","full_name":"scikit-learn/scikit-learn","owner":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scikit-learn/scikit-learn","description":"scikit-learn: machine learning in Python","fork":false,"url":"https://api.github.com/repos/scikit-learn/scikit-learn","forks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/forks","keys_url":"https://api.github.com/repos/scikit-learn/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-learn/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-learn/scikit-learn/teams","hooks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/events","assignees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-learn/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/tags","blobs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-learn/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscription","commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments/{number}","contents_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-learn/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-learn/scikit-learn/merges","archive_url":"https://api.github.com/repos/scikit-learn/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-learn/scikit-learn/downloads","issues_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-learn/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/scikit-learn/scikit-learn/releases{/id}","created_at":"2010-08-17T09:43:38Z","updated_at":"2015-02-11T11:51:44Z","pushed_at":"2015-02-10T16:49:10Z","git_url":"git://github.com/scikit-learn/scikit-learn.git","ssh_url":"git@github.com:scikit-learn/scikit-learn.git","clone_url":"https://github.com/scikit-learn/scikit-learn.git","svn_url":"https://github.com/scikit-learn/scikit-learn","homepage":"http://scikit-learn.org","size":111740,"stargazers_count":5043,"watchers_count":5043,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2959,"mirror_url":null,"open_issues_count":572,"forks":2959,"open_issues":572,"watchers":5043,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4226"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4226"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4226"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4226/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4226/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4226/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/452bc124c17b5f462466e0a5b4450d9aabd1e876"}}}}