{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/37635394","id":37635394,"diff_hunk":"@@ -393,6 +394,20 @@ def test_observed_otus(self):\n     def test_osd(self):\n         self.assertEqual(osd(self.counts), (9, 3, 3))\n \n+    def test_pielou(self):\n+        # Calculate \"by hand\".\n+        arr = np.array([1, 2, 3, 1])\n+        h = shannon(arr)\n+        s = 4\n+        expected = h / np.log(s)\n+        self.assertAlmostEqual(pielou(arr), expected)\n+\n+        self.assertAlmostEqual(pielou(self.counts), 1.334283585856)","path":"skbio/diversity/alpha/tests/test_base.py","position":22,"original_position":22,"commit_id":"aa7b45a261dbd9790de9bcffec6a1fe7a3105405","original_commit_id":"aa7b45a261dbd9790de9bcffec6a1fe7a3105405","user":{"login":"gregcaporaso","id":192372,"avatar_url":"https://avatars.githubusercontent.com/u/192372?v=3","gravatar_id":"","url":"https://api.github.com/users/gregcaporaso","html_url":"https://github.com/gregcaporaso","followers_url":"https://api.github.com/users/gregcaporaso/followers","following_url":"https://api.github.com/users/gregcaporaso/following{/other_user}","gists_url":"https://api.github.com/users/gregcaporaso/gists{/gist_id}","starred_url":"https://api.github.com/users/gregcaporaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregcaporaso/subscriptions","organizations_url":"https://api.github.com/users/gregcaporaso/orgs","repos_url":"https://api.github.com/users/gregcaporaso/repos","events_url":"https://api.github.com/users/gregcaporaso/events{/privacy}","received_events_url":"https://api.github.com/users/gregcaporaso/received_events","type":"User","site_admin":false},"body":"A couple of additional \"boundary case\" tests would also be good here. Can you test with passing in an empty vector (i.e., ``[]``), a vector where there are counts greater than 1 (e.g., ``[1,2,3,0]``), and a vector where ``observed_otus == 0``? \r\n\r\nAlso, minor, but you only need to have the seven most significant digits in your expected values, b/c ``assertAlmostEqual`` only checks for equality to the sixth decimal place by default.  ","created_at":"2015-08-21T13:50:40Z","updated_at":"2015-08-21T13:50:40Z","html_url":"https://github.com/biocore/scikit-bio/pull/1069#discussion_r37635394","pull_request_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1069","_links":{"self":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/37635394"},"html":{"href":"https://github.com/biocore/scikit-bio/pull/1069#discussion_r37635394"},"pull_request":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/1069"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1069","id":42995138,"html_url":"https://github.com/biocore/scikit-bio/pull/1069","diff_url":"https://github.com/biocore/scikit-bio/pull/1069.diff","patch_url":"https://github.com/biocore/scikit-bio/pull/1069.patch","issue_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1069","number":1069,"state":"open","locked":false,"title":"Add pielous evenness","user":{"login":"colinbrislawn","id":10355152,"avatar_url":"https://avatars.githubusercontent.com/u/10355152?v=3","gravatar_id":"","url":"https://api.github.com/users/colinbrislawn","html_url":"https://github.com/colinbrislawn","followers_url":"https://api.github.com/users/colinbrislawn/followers","following_url":"https://api.github.com/users/colinbrislawn/following{/other_user}","gists_url":"https://api.github.com/users/colinbrislawn/gists{/gist_id}","starred_url":"https://api.github.com/users/colinbrislawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinbrislawn/subscriptions","organizations_url":"https://api.github.com/users/colinbrislawn/orgs","repos_url":"https://api.github.com/users/colinbrislawn/repos","events_url":"https://api.github.com/users/colinbrislawn/events{/privacy}","received_events_url":"https://api.github.com/users/colinbrislawn/received_events","type":"User","site_admin":false},"body":"Fixes #1068 \r\n\r\nI'm new at this and I'm sure there are style issues.\r\nSuggestions are welcome!","created_at":"2015-08-21T01:06:05Z","updated_at":"2015-08-21T13:50:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc4c62cb3678f5693768554aa13a333ead3afa71","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1069/commits","review_comments_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1069/comments","review_comment_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1069/comments","statuses_url":"https://api.github.com/repos/biocore/scikit-bio/statuses/aa7b45a261dbd9790de9bcffec6a1fe7a3105405","head":{"label":"colinbrislawn:add_pielous_evenness","ref":"add_pielous_evenness","sha":"aa7b45a261dbd9790de9bcffec6a1fe7a3105405","user":{"login":"colinbrislawn","id":10355152,"avatar_url":"https://avatars.githubusercontent.com/u/10355152?v=3","gravatar_id":"","url":"https://api.github.com/users/colinbrislawn","html_url":"https://github.com/colinbrislawn","followers_url":"https://api.github.com/users/colinbrislawn/followers","following_url":"https://api.github.com/users/colinbrislawn/following{/other_user}","gists_url":"https://api.github.com/users/colinbrislawn/gists{/gist_id}","starred_url":"https://api.github.com/users/colinbrislawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinbrislawn/subscriptions","organizations_url":"https://api.github.com/users/colinbrislawn/orgs","repos_url":"https://api.github.com/users/colinbrislawn/repos","events_url":"https://api.github.com/users/colinbrislawn/events{/privacy}","received_events_url":"https://api.github.com/users/colinbrislawn/received_events","type":"User","site_admin":false},"repo":{"id":41120415,"name":"scikit-bio","full_name":"colinbrislawn/scikit-bio","owner":{"login":"colinbrislawn","id":10355152,"avatar_url":"https://avatars.githubusercontent.com/u/10355152?v=3","gravatar_id":"","url":"https://api.github.com/users/colinbrislawn","html_url":"https://github.com/colinbrislawn","followers_url":"https://api.github.com/users/colinbrislawn/followers","following_url":"https://api.github.com/users/colinbrislawn/following{/other_user}","gists_url":"https://api.github.com/users/colinbrislawn/gists{/gist_id}","starred_url":"https://api.github.com/users/colinbrislawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinbrislawn/subscriptions","organizations_url":"https://api.github.com/users/colinbrislawn/orgs","repos_url":"https://api.github.com/users/colinbrislawn/repos","events_url":"https://api.github.com/users/colinbrislawn/events{/privacy}","received_events_url":"https://api.github.com/users/colinbrislawn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/colinbrislawn/scikit-bio","description":"scikit-bio is an open-source, BSD-licensed, Python package providing data structures, algorithms, and educational resources for bioinformatics.","fork":true,"url":"https://api.github.com/repos/colinbrislawn/scikit-bio","forks_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/forks","keys_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/teams","hooks_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/hooks","issue_events_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/issues/events{/number}","events_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/events","assignees_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/assignees{/user}","branches_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/branches{/branch}","tags_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/tags","blobs_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/git/refs{/sha}","trees_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/statuses/{sha}","languages_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/languages","stargazers_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/stargazers","contributors_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/contributors","subscribers_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/subscribers","subscription_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/subscription","commits_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/commits{/sha}","git_commits_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/git/commits{/sha}","comments_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/comments{/number}","issue_comment_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/issues/comments{/number}","contents_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/contents/{+path}","compare_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/merges","archive_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/downloads","issues_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/issues{/number}","pulls_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/pulls{/number}","milestones_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/milestones{/number}","notifications_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/labels{/name}","releases_url":"https://api.github.com/repos/colinbrislawn/scikit-bio/releases{/id}","created_at":"2015-08-20T21:48:45Z","updated_at":"2015-08-20T21:48:47Z","pushed_at":"2015-08-21T01:00:45Z","git_url":"git://github.com/colinbrislawn/scikit-bio.git","ssh_url":"git@github.com:colinbrislawn/scikit-bio.git","clone_url":"https://github.com/colinbrislawn/scikit-bio.git","svn_url":"https://github.com/colinbrislawn/scikit-bio","homepage":"http://scikit-bio.org","size":41431,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"biocore:master","ref":"master","sha":"03d6dcb4a9d9001c8cadc5c954b47f27d9c45a83","user":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"repo":{"id":15168264,"name":"scikit-bio","full_name":"biocore/scikit-bio","owner":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biocore/scikit-bio","description":"scikit-bio is an open-source, BSD-licensed, Python package providing data structures, algorithms, and educational resources for bioinformatics.","fork":false,"url":"https://api.github.com/repos/biocore/scikit-bio","forks_url":"https://api.github.com/repos/biocore/scikit-bio/forks","keys_url":"https://api.github.com/repos/biocore/scikit-bio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biocore/scikit-bio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biocore/scikit-bio/teams","hooks_url":"https://api.github.com/repos/biocore/scikit-bio/hooks","issue_events_url":"https://api.github.com/repos/biocore/scikit-bio/issues/events{/number}","events_url":"https://api.github.com/repos/biocore/scikit-bio/events","assignees_url":"https://api.github.com/repos/biocore/scikit-bio/assignees{/user}","branches_url":"https://api.github.com/repos/biocore/scikit-bio/branches{/branch}","tags_url":"https://api.github.com/repos/biocore/scikit-bio/tags","blobs_url":"https://api.github.com/repos/biocore/scikit-bio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biocore/scikit-bio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biocore/scikit-bio/git/refs{/sha}","trees_url":"https://api.github.com/repos/biocore/scikit-bio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biocore/scikit-bio/statuses/{sha}","languages_url":"https://api.github.com/repos/biocore/scikit-bio/languages","stargazers_url":"https://api.github.com/repos/biocore/scikit-bio/stargazers","contributors_url":"https://api.github.com/repos/biocore/scikit-bio/contributors","subscribers_url":"https://api.github.com/repos/biocore/scikit-bio/subscribers","subscription_url":"https://api.github.com/repos/biocore/scikit-bio/subscription","commits_url":"https://api.github.com/repos/biocore/scikit-bio/commits{/sha}","git_commits_url":"https://api.github.com/repos/biocore/scikit-bio/git/commits{/sha}","comments_url":"https://api.github.com/repos/biocore/scikit-bio/comments{/number}","issue_comment_url":"https://api.github.com/repos/biocore/scikit-bio/issues/comments{/number}","contents_url":"https://api.github.com/repos/biocore/scikit-bio/contents/{+path}","compare_url":"https://api.github.com/repos/biocore/scikit-bio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biocore/scikit-bio/merges","archive_url":"https://api.github.com/repos/biocore/scikit-bio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biocore/scikit-bio/downloads","issues_url":"https://api.github.com/repos/biocore/scikit-bio/issues{/number}","pulls_url":"https://api.github.com/repos/biocore/scikit-bio/pulls{/number}","milestones_url":"https://api.github.com/repos/biocore/scikit-bio/milestones{/number}","notifications_url":"https://api.github.com/repos/biocore/scikit-bio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biocore/scikit-bio/labels{/name}","releases_url":"https://api.github.com/repos/biocore/scikit-bio/releases{/id}","created_at":"2013-12-13T16:24:41Z","updated_at":"2015-08-13T13:47:16Z","pushed_at":"2015-08-21T12:19:22Z","git_url":"git://github.com/biocore/scikit-bio.git","ssh_url":"git@github.com:biocore/scikit-bio.git","clone_url":"https://github.com/biocore/scikit-bio.git","svn_url":"https://github.com/biocore/scikit-bio","homepage":"http://scikit-bio.org","size":41431,"stargazers_count":149,"watchers_count":149,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":85,"mirror_url":null,"open_issues_count":133,"forks":85,"open_issues":133,"watchers":149,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/1069"},"html":{"href":"https://github.com/biocore/scikit-bio/pull/1069"},"issue":{"href":"https://api.github.com/repos/biocore/scikit-bio/issues/1069"},"comments":{"href":"https://api.github.com/repos/biocore/scikit-bio/issues/1069/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/1069/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/1069/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/scikit-bio/statuses/aa7b45a261dbd9790de9bcffec6a1fe7a3105405"}}}}