{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/29037467","id":29037467,"diff_hunk":"@@ -256,3 +256,38 @@ def test_gaussian_sigma_to_fwhm():\n def test_gaussian_sigma_to_fwhm_to_sigma():\n     assert_allclose(funcs.gaussian_fwhm_to_sigma *\n                     funcs.gaussian_sigma_to_fwhm, 1.0)\n+\n+\n+def test_poisson_conf_interval_rootn():\n+    assert_allclose(funcs.poisson_conf_interval(16, interval='root-n'),\n+                    (12, 20))\n+\n+def test_poisson_conf_large_pearson():\n+    n = 100\n+    assert_allclose(funcs.poisson_conf_interval(n, interval='root-n'),\n+                    funcs.poisson_conf_interval(n, interval='pearson'),\n+                    rtol=2e-2)\n+\n+@pytest.mark.skipif('not HAS_SCIPY')\n+def test_poisson_conf_large_frequentist_confidence():\n+    n = 100\n+    assert_allclose(funcs.poisson_conf_interval(n, interval='root-n'),\n+                    funcs.poisson_conf_interval(n,\n+                        interval='frequentist-confidence'),\n+                    rtol=2e-2)\n+\n+def test_poisson_conf_array_rootn0():\n+    n = 7*np.ones((3,4,5))\n+    assert_allclose(funcs.poisson_conf_interval(n, interval='root-n-0'),\n+                    funcs.poisson_conf_interval(n[0,0,0], interval='root-n-0')[:,None,None,None]*np.ones_like(n))\n+\n+    n[1,2,3] = 0\n+    assert not np.any(np.isnan(funcs.poisson_conf_interval(n, interval='root-n-0')))\n+\n+def test_poisson_conf_array_fc():","path":"astropy/stats/tests/test_funcs.py","position":32,"original_position":32,"commit_id":"3379cde10caa9b870c7d8736066b18e64f529c54","original_commit_id":"3379cde10caa9b870c7d8736066b18e64f529c54","user":{"login":"embray","id":676149,"avatar_url":"https://avatars.githubusercontent.com/u/676149?v=3","gravatar_id":"","url":"https://api.github.com/users/embray","html_url":"https://github.com/embray","followers_url":"https://api.github.com/users/embray/followers","following_url":"https://api.github.com/users/embray/following{/other_user}","gists_url":"https://api.github.com/users/embray/gists{/gist_id}","starred_url":"https://api.github.com/users/embray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embray/subscriptions","organizations_url":"https://api.github.com/users/embray/orgs","repos_url":"https://api.github.com/users/embray/repos","events_url":"https://api.github.com/users/embray/events{/privacy}","received_events_url":"https://api.github.com/users/embray/received_events","type":"User","site_admin":false},"body":"I could have sworn all of our build configurations had scipy but maybe not.  ","created_at":"2015-04-24T09:59:15Z","updated_at":"2015-04-24T09:59:15Z","html_url":"https://github.com/astropy/astropy/pull/3717#discussion_r29037467","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/3717","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/29037467"},"html":{"href":"https://github.com/astropy/astropy/pull/3717#discussion_r29037467"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3717"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/3717","id":33969845,"html_url":"https://github.com/astropy/astropy/pull/3717","diff_url":"https://github.com/astropy/astropy/pull/3717.diff","patch_url":"https://github.com/astropy/astropy/pull/3717.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/3717","number":3717,"state":"open","locked":false,"title":"Implement Poisson confidence intervals","user":{"login":"aarchiba","id":136867,"avatar_url":"https://avatars.githubusercontent.com/u/136867?v=3","gravatar_id":"","url":"https://api.github.com/users/aarchiba","html_url":"https://github.com/aarchiba","followers_url":"https://api.github.com/users/aarchiba/followers","following_url":"https://api.github.com/users/aarchiba/following{/other_user}","gists_url":"https://api.github.com/users/aarchiba/gists{/gist_id}","starred_url":"https://api.github.com/users/aarchiba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarchiba/subscriptions","organizations_url":"https://api.github.com/users/aarchiba/orgs","repos_url":"https://api.github.com/users/aarchiba/repos","events_url":"https://api.github.com/users/aarchiba/events{/privacy}","received_events_url":"https://api.github.com/users/aarchiba/received_events","type":"User","site_admin":false},"body":"Partly covers issue #3711 ","created_at":"2015-04-23T15:57:18Z","updated_at":"2015-04-24T09:59:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b3e09919ef750c37b719ca642dae671122cd10b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/3717/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/3717/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/3717/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/3379cde10caa9b870c7d8736066b18e64f529c54","head":{"label":"aarchiba:poisson_errors","ref":"poisson_errors","sha":"3379cde10caa9b870c7d8736066b18e64f529c54","user":{"login":"aarchiba","id":136867,"avatar_url":"https://avatars.githubusercontent.com/u/136867?v=3","gravatar_id":"","url":"https://api.github.com/users/aarchiba","html_url":"https://github.com/aarchiba","followers_url":"https://api.github.com/users/aarchiba/followers","following_url":"https://api.github.com/users/aarchiba/following{/other_user}","gists_url":"https://api.github.com/users/aarchiba/gists{/gist_id}","starred_url":"https://api.github.com/users/aarchiba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarchiba/subscriptions","organizations_url":"https://api.github.com/users/aarchiba/orgs","repos_url":"https://api.github.com/users/aarchiba/repos","events_url":"https://api.github.com/users/aarchiba/events{/privacy}","received_events_url":"https://api.github.com/users/aarchiba/received_events","type":"User","site_admin":false},"repo":{"id":34362934,"name":"astropy","full_name":"aarchiba/astropy","owner":{"login":"aarchiba","id":136867,"avatar_url":"https://avatars.githubusercontent.com/u/136867?v=3","gravatar_id":"","url":"https://api.github.com/users/aarchiba","html_url":"https://github.com/aarchiba","followers_url":"https://api.github.com/users/aarchiba/followers","following_url":"https://api.github.com/users/aarchiba/following{/other_user}","gists_url":"https://api.github.com/users/aarchiba/gists{/gist_id}","starred_url":"https://api.github.com/users/aarchiba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarchiba/subscriptions","organizations_url":"https://api.github.com/users/aarchiba/orgs","repos_url":"https://api.github.com/users/aarchiba/repos","events_url":"https://api.github.com/users/aarchiba/events{/privacy}","received_events_url":"https://api.github.com/users/aarchiba/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aarchiba/astropy","description":"Repository for the Astropy core package","fork":true,"url":"https://api.github.com/repos/aarchiba/astropy","forks_url":"https://api.github.com/repos/aarchiba/astropy/forks","keys_url":"https://api.github.com/repos/aarchiba/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aarchiba/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aarchiba/astropy/teams","hooks_url":"https://api.github.com/repos/aarchiba/astropy/hooks","issue_events_url":"https://api.github.com/repos/aarchiba/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/aarchiba/astropy/events","assignees_url":"https://api.github.com/repos/aarchiba/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/aarchiba/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/aarchiba/astropy/tags","blobs_url":"https://api.github.com/repos/aarchiba/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aarchiba/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aarchiba/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/aarchiba/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aarchiba/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/aarchiba/astropy/languages","stargazers_url":"https://api.github.com/repos/aarchiba/astropy/stargazers","contributors_url":"https://api.github.com/repos/aarchiba/astropy/contributors","subscribers_url":"https://api.github.com/repos/aarchiba/astropy/subscribers","subscription_url":"https://api.github.com/repos/aarchiba/astropy/subscription","commits_url":"https://api.github.com/repos/aarchiba/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/aarchiba/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/aarchiba/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/aarchiba/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/aarchiba/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/aarchiba/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aarchiba/astropy/merges","archive_url":"https://api.github.com/repos/aarchiba/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aarchiba/astropy/downloads","issues_url":"https://api.github.com/repos/aarchiba/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/aarchiba/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/aarchiba/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/aarchiba/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aarchiba/astropy/labels{/name}","releases_url":"https://api.github.com/repos/aarchiba/astropy/releases{/id}","created_at":"2015-04-22T02:04:39Z","updated_at":"2015-04-22T02:04:44Z","pushed_at":"2015-04-23T15:54:21Z","git_url":"git://github.com/aarchiba/astropy.git","ssh_url":"git@github.com:aarchiba/astropy.git","clone_url":"https://github.com/aarchiba/astropy.git","svn_url":"https://github.com/aarchiba/astropy","homepage":"www.astropy.org","size":64599,"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":"astropy:master","ref":"master","sha":"481d1d3a7257155dddb43b39c793f65ff1457338","user":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":2081289,"name":"astropy","full_name":"astropy/astropy","owner":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astropy/astropy","description":"Repository for the Astropy core package","fork":false,"url":"https://api.github.com/repos/astropy/astropy","forks_url":"https://api.github.com/repos/astropy/astropy/forks","keys_url":"https://api.github.com/repos/astropy/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/astropy/teams","hooks_url":"https://api.github.com/repos/astropy/astropy/hooks","issue_events_url":"https://api.github.com/repos/astropy/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/astropy/events","assignees_url":"https://api.github.com/repos/astropy/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/astropy/tags","blobs_url":"https://api.github.com/repos/astropy/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/astropy/languages","stargazers_url":"https://api.github.com/repos/astropy/astropy/stargazers","contributors_url":"https://api.github.com/repos/astropy/astropy/contributors","subscribers_url":"https://api.github.com/repos/astropy/astropy/subscribers","subscription_url":"https://api.github.com/repos/astropy/astropy/subscription","commits_url":"https://api.github.com/repos/astropy/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/astropy/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/astropy/merges","archive_url":"https://api.github.com/repos/astropy/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/astropy/downloads","issues_url":"https://api.github.com/repos/astropy/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/astropy/labels{/name}","releases_url":"https://api.github.com/repos/astropy/astropy/releases{/id}","created_at":"2011-07-21T01:33:49Z","updated_at":"2015-04-24T08:34:14Z","pushed_at":"2015-04-24T08:05:30Z","git_url":"git://github.com/astropy/astropy.git","ssh_url":"git@github.com:astropy/astropy.git","clone_url":"https://github.com/astropy/astropy.git","svn_url":"https://github.com/astropy/astropy","homepage":"www.astropy.org","size":64599,"stargazers_count":532,"watchers_count":532,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":378,"mirror_url":null,"open_issues_count":496,"forks":378,"open_issues":496,"watchers":532,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3717"},"html":{"href":"https://github.com/astropy/astropy/pull/3717"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/3717"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/3717/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3717/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3717/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/3379cde10caa9b870c7d8736066b18e64f529c54"}}}}