{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/31869780","id":31869780,"diff_hunk":"@@ -263,6 +263,40 @@ def test_infer_dim_3():\n     assert_greater(_infer_dimension_(spect, n, p), 2)\n \n \n+def test_infer_dim_bad_spec():\n+    \"\"\"\n+    Test that we deal with a spectrum that drops to near zero\n+    see issue https://github.com/scikit-learn/scikit-learn/issues/4441\n+    \"\"\"\n+    spectrum = np.array([1.02875554e-03,\n+                         7.06329556e-30,\n+                         2.93889872e-31,\n+                         2.22470973e-31,\n+                         2.22470973e-31])\n+    n_samples = 10\n+    n_features = 5\n+    ret = _infer_dimension_(spectrum, n_samples, n_features)\n+    assert_equal(ret, 0)","path":"sklearn/decomposition/tests/test_pca.py","position":26,"original_position":26,"commit_id":"2c0f5c7e930f8b2c6967969342efcc647c64f774","original_commit_id":"2c0f5c7e930f8b2c6967969342efcc647c64f774","user":{"login":"amueller","id":449558,"avatar_url":"https://avatars.githubusercontent.com/u/449558?v=3","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"body":"I agree. it should be 1, right?","created_at":"2015-06-06T17:16:48Z","updated_at":"2015-06-06T17:16:48Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4827#discussion_r31869780","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4827","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/31869780"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4827#discussion_r31869780"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4827"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4827","id":37064181,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/4827","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/4827.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/4827.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4827","number":4827,"state":"open","locked":false,"title":"Issue 4441","user":{"login":"lbillingham","id":10627907,"avatar_url":"https://avatars.githubusercontent.com/u/10627907?v=3","gravatar_id":"","url":"https://api.github.com/users/lbillingham","html_url":"https://github.com/lbillingham","followers_url":"https://api.github.com/users/lbillingham/followers","following_url":"https://api.github.com/users/lbillingham/following{/other_user}","gists_url":"https://api.github.com/users/lbillingham/gists{/gist_id}","starred_url":"https://api.github.com/users/lbillingham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbillingham/subscriptions","organizations_url":"https://api.github.com/users/lbillingham/orgs","repos_url":"https://api.github.com/users/lbillingham/repos","events_url":"https://api.github.com/users/lbillingham/events{/privacy}","received_events_url":"https://api.github.com/users/lbillingham/received_events","type":"User","site_admin":false},"body":"I'm only getting \r\nsingle lines in the compare view now for \r\n\r\n    https://github.com/scikit-learn/scikit-learn/compare/master...lbillingham:issue_4441 \r\n\r\nhopefully line endings are now actually posix-y","created_at":"2015-06-05T19:52:20Z","updated_at":"2015-06-06T17:16:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09f824845d1855ea58afa040b8502240b46e59e2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4827/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4827/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/4827/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/2c0f5c7e930f8b2c6967969342efcc647c64f774","head":{"label":"lbillingham:issue_4441","ref":"issue_4441","sha":"2c0f5c7e930f8b2c6967969342efcc647c64f774","user":{"login":"lbillingham","id":10627907,"avatar_url":"https://avatars.githubusercontent.com/u/10627907?v=3","gravatar_id":"","url":"https://api.github.com/users/lbillingham","html_url":"https://github.com/lbillingham","followers_url":"https://api.github.com/users/lbillingham/followers","following_url":"https://api.github.com/users/lbillingham/following{/other_user}","gists_url":"https://api.github.com/users/lbillingham/gists{/gist_id}","starred_url":"https://api.github.com/users/lbillingham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbillingham/subscriptions","organizations_url":"https://api.github.com/users/lbillingham/orgs","repos_url":"https://api.github.com/users/lbillingham/repos","events_url":"https://api.github.com/users/lbillingham/events{/privacy}","received_events_url":"https://api.github.com/users/lbillingham/received_events","type":"User","site_admin":false},"repo":{"id":36948451,"name":"scikit-learn","full_name":"lbillingham/scikit-learn","owner":{"login":"lbillingham","id":10627907,"avatar_url":"https://avatars.githubusercontent.com/u/10627907?v=3","gravatar_id":"","url":"https://api.github.com/users/lbillingham","html_url":"https://github.com/lbillingham","followers_url":"https://api.github.com/users/lbillingham/followers","following_url":"https://api.github.com/users/lbillingham/following{/other_user}","gists_url":"https://api.github.com/users/lbillingham/gists{/gist_id}","starred_url":"https://api.github.com/users/lbillingham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbillingham/subscriptions","organizations_url":"https://api.github.com/users/lbillingham/orgs","repos_url":"https://api.github.com/users/lbillingham/repos","events_url":"https://api.github.com/users/lbillingham/events{/privacy}","received_events_url":"https://api.github.com/users/lbillingham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lbillingham/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/lbillingham/scikit-learn","forks_url":"https://api.github.com/repos/lbillingham/scikit-learn/forks","keys_url":"https://api.github.com/repos/lbillingham/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lbillingham/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lbillingham/scikit-learn/teams","hooks_url":"https://api.github.com/repos/lbillingham/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/lbillingham/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/lbillingham/scikit-learn/events","assignees_url":"https://api.github.com/repos/lbillingham/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/lbillingham/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/lbillingham/scikit-learn/tags","blobs_url":"https://api.github.com/repos/lbillingham/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lbillingham/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lbillingham/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/lbillingham/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lbillingham/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/lbillingham/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/lbillingham/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/lbillingham/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/lbillingham/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/lbillingham/scikit-learn/subscription","commits_url":"https://api.github.com/repos/lbillingham/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/lbillingham/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/lbillingham/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/lbillingham/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/lbillingham/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/lbillingham/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lbillingham/scikit-learn/merges","archive_url":"https://api.github.com/repos/lbillingham/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lbillingham/scikit-learn/downloads","issues_url":"https://api.github.com/repos/lbillingham/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/lbillingham/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/lbillingham/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/lbillingham/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lbillingham/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/lbillingham/scikit-learn/releases{/id}","created_at":"2015-06-05T18:25:54Z","updated_at":"2015-06-05T18:26:00Z","pushed_at":"2015-06-05T19:50:12Z","git_url":"git://github.com/lbillingham/scikit-learn.git","ssh_url":"git@github.com:lbillingham/scikit-learn.git","clone_url":"https://github.com/lbillingham/scikit-learn.git","svn_url":"https://github.com/lbillingham/scikit-learn","homepage":"http://scikit-learn.org","size":62744,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"0a5d92459a20f592a30a3a19489d3c7e00c770f0","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-06-06T14:01:07Z","pushed_at":"2015-06-06T15:58:08Z","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":122184,"stargazers_count":6302,"watchers_count":6302,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3783,"mirror_url":null,"open_issues_count":683,"forks":3783,"open_issues":683,"watchers":6302,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4827"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4827"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4827"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4827/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4827/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/4827/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/2c0f5c7e930f8b2c6967969342efcc647c64f774"}}}}