{"action":"created","comment":{"url":"https://api.github.com/repos/numpy/numpy/pulls/comments/79294507","id":79294507,"diff_hunk":"@@ -4888,6 +4889,247 @@ cdef class RandomState:\n \n         return multin\n \n+    def _multivariate_hypergeometric1(self, ndarray colors,\n+                                      npy_intp nsample, size=None):\n+        # Algorithm 1 to sample from the multivariate hypergeometric\n+        # distribution.\n+        # Iteratively call rk_hypergeometric.\n+        #\n+        # Example: Suppose the urn contains red, green, blue and yellow marbles.\n+        # Let nred be the number of red marbles, and define the quantities for the\n+        # other colors similarly.  The total number of marbles is\n+        #    total =nred+ngreen+nblue+nyellow.","path":"numpy/random/mtrand/mtrand.pyx","position":30,"original_position":30,"commit_id":"7544896a34ea98ca9fc5613173966fea23d73f00","original_commit_id":"7544896a34ea98ca9fc5613173966fea23d73f00","user":{"login":"charris","id":77272,"avatar_url":"https://avatars.githubusercontent.com/u/77272?v=3","gravatar_id":"","url":"https://api.github.com/users/charris","html_url":"https://github.com/charris","followers_url":"https://api.github.com/users/charris/followers","following_url":"https://api.github.com/users/charris/following{/other_user}","gists_url":"https://api.github.com/users/charris/gists{/gist_id}","starred_url":"https://api.github.com/users/charris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charris/subscriptions","organizations_url":"https://api.github.com/users/charris/orgs","repos_url":"https://api.github.com/users/charris/repos","events_url":"https://api.github.com/users/charris/events{/privacy}","received_events_url":"https://api.github.com/users/charris/received_events","type":"User","site_admin":false},"body":"Can be better formatted using some spaces.","created_at":"2016-09-18T00:17:46Z","updated_at":"2016-09-18T00:17:46Z","html_url":"https://github.com/numpy/numpy/pull/8056#discussion_r79294507","pull_request_url":"https://api.github.com/repos/numpy/numpy/pulls/8056","_links":{"self":{"href":"https://api.github.com/repos/numpy/numpy/pulls/comments/79294507"},"html":{"href":"https://github.com/numpy/numpy/pull/8056#discussion_r79294507"},"pull_request":{"href":"https://api.github.com/repos/numpy/numpy/pulls/8056"}}},"pull_request":{"url":"https://api.github.com/repos/numpy/numpy/pulls/8056","id":85675674,"html_url":"https://github.com/numpy/numpy/pull/8056","diff_url":"https://github.com/numpy/numpy/pull/8056.diff","patch_url":"https://github.com/numpy/numpy/pull/8056.patch","issue_url":"https://api.github.com/repos/numpy/numpy/issues/8056","number":8056,"state":"open","locked":false,"title":"ENH: random: Add multivariate_hypergeometric function.","user":{"login":"WarrenWeckesser","id":321463,"avatar_url":"https://avatars.githubusercontent.com/u/321463?v=3","gravatar_id":"","url":"https://api.github.com/users/WarrenWeckesser","html_url":"https://github.com/WarrenWeckesser","followers_url":"https://api.github.com/users/WarrenWeckesser/followers","following_url":"https://api.github.com/users/WarrenWeckesser/following{/other_user}","gists_url":"https://api.github.com/users/WarrenWeckesser/gists{/gist_id}","starred_url":"https://api.github.com/users/WarrenWeckesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WarrenWeckesser/subscriptions","organizations_url":"https://api.github.com/users/WarrenWeckesser/orgs","repos_url":"https://api.github.com/users/WarrenWeckesser/repos","events_url":"https://api.github.com/users/WarrenWeckesser/events{/privacy}","received_events_url":"https://api.github.com/users/WarrenWeckesser/received_events","type":"User","site_admin":false},"body":"Add a function that draws from a multivariate hypergeometric distribution.\r\n","created_at":"2016-09-17T14:18:35Z","updated_at":"2016-09-18T00:17:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75b97408002ca77fbba05acf529466e2b1b36b36","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/numpy/numpy/pulls/8056/commits","review_comments_url":"https://api.github.com/repos/numpy/numpy/pulls/8056/comments","review_comment_url":"https://api.github.com/repos/numpy/numpy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/8056/comments","statuses_url":"https://api.github.com/repos/numpy/numpy/statuses/7544896a34ea98ca9fc5613173966fea23d73f00","head":{"label":"WarrenWeckesser:multivar-hypergeom","ref":"multivar-hypergeom","sha":"7544896a34ea98ca9fc5613173966fea23d73f00","user":{"login":"WarrenWeckesser","id":321463,"avatar_url":"https://avatars.githubusercontent.com/u/321463?v=3","gravatar_id":"","url":"https://api.github.com/users/WarrenWeckesser","html_url":"https://github.com/WarrenWeckesser","followers_url":"https://api.github.com/users/WarrenWeckesser/followers","following_url":"https://api.github.com/users/WarrenWeckesser/following{/other_user}","gists_url":"https://api.github.com/users/WarrenWeckesser/gists{/gist_id}","starred_url":"https://api.github.com/users/WarrenWeckesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WarrenWeckesser/subscriptions","organizations_url":"https://api.github.com/users/WarrenWeckesser/orgs","repos_url":"https://api.github.com/users/WarrenWeckesser/repos","events_url":"https://api.github.com/users/WarrenWeckesser/events{/privacy}","received_events_url":"https://api.github.com/users/WarrenWeckesser/received_events","type":"User","site_admin":false},"repo":{"id":3243386,"name":"numpy","full_name":"WarrenWeckesser/numpy","owner":{"login":"WarrenWeckesser","id":321463,"avatar_url":"https://avatars.githubusercontent.com/u/321463?v=3","gravatar_id":"","url":"https://api.github.com/users/WarrenWeckesser","html_url":"https://github.com/WarrenWeckesser","followers_url":"https://api.github.com/users/WarrenWeckesser/followers","following_url":"https://api.github.com/users/WarrenWeckesser/following{/other_user}","gists_url":"https://api.github.com/users/WarrenWeckesser/gists{/gist_id}","starred_url":"https://api.github.com/users/WarrenWeckesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WarrenWeckesser/subscriptions","organizations_url":"https://api.github.com/users/WarrenWeckesser/orgs","repos_url":"https://api.github.com/users/WarrenWeckesser/repos","events_url":"https://api.github.com/users/WarrenWeckesser/events{/privacy}","received_events_url":"https://api.github.com/users/WarrenWeckesser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WarrenWeckesser/numpy","description":"Numpy main repository","fork":true,"url":"https://api.github.com/repos/WarrenWeckesser/numpy","forks_url":"https://api.github.com/repos/WarrenWeckesser/numpy/forks","keys_url":"https://api.github.com/repos/WarrenWeckesser/numpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WarrenWeckesser/numpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WarrenWeckesser/numpy/teams","hooks_url":"https://api.github.com/repos/WarrenWeckesser/numpy/hooks","issue_events_url":"https://api.github.com/repos/WarrenWeckesser/numpy/issues/events{/number}","events_url":"https://api.github.com/repos/WarrenWeckesser/numpy/events","assignees_url":"https://api.github.com/repos/WarrenWeckesser/numpy/assignees{/user}","branches_url":"https://api.github.com/repos/WarrenWeckesser/numpy/branches{/branch}","tags_url":"https://api.github.com/repos/WarrenWeckesser/numpy/tags","blobs_url":"https://api.github.com/repos/WarrenWeckesser/numpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WarrenWeckesser/numpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WarrenWeckesser/numpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/WarrenWeckesser/numpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WarrenWeckesser/numpy/statuses/{sha}","languages_url":"https://api.github.com/repos/WarrenWeckesser/numpy/languages","stargazers_url":"https://api.github.com/repos/WarrenWeckesser/numpy/stargazers","contributors_url":"https://api.github.com/repos/WarrenWeckesser/numpy/contributors","subscribers_url":"https://api.github.com/repos/WarrenWeckesser/numpy/subscribers","subscription_url":"https://api.github.com/repos/WarrenWeckesser/numpy/subscription","commits_url":"https://api.github.com/repos/WarrenWeckesser/numpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/WarrenWeckesser/numpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/WarrenWeckesser/numpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/WarrenWeckesser/numpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/WarrenWeckesser/numpy/contents/{+path}","compare_url":"https://api.github.com/repos/WarrenWeckesser/numpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WarrenWeckesser/numpy/merges","archive_url":"https://api.github.com/repos/WarrenWeckesser/numpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WarrenWeckesser/numpy/downloads","issues_url":"https://api.github.com/repos/WarrenWeckesser/numpy/issues{/number}","pulls_url":"https://api.github.com/repos/WarrenWeckesser/numpy/pulls{/number}","milestones_url":"https://api.github.com/repos/WarrenWeckesser/numpy/milestones{/number}","notifications_url":"https://api.github.com/repos/WarrenWeckesser/numpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WarrenWeckesser/numpy/labels{/name}","releases_url":"https://api.github.com/repos/WarrenWeckesser/numpy/releases{/id}","deployments_url":"https://api.github.com/repos/WarrenWeckesser/numpy/deployments","created_at":"2012-01-23T01:19:51Z","updated_at":"2015-01-28T04:07:59Z","pushed_at":"2016-09-17T22:25:35Z","git_url":"git://github.com/WarrenWeckesser/numpy.git","ssh_url":"git@github.com:WarrenWeckesser/numpy.git","clone_url":"https://github.com/WarrenWeckesser/numpy.git","svn_url":"https://github.com/WarrenWeckesser/numpy","homepage":"http://www.numpy.org/","size":40047,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"numpy:master","ref":"master","sha":"c90d7c94fd2077d0beca48fa89a423da2b0bb663","user":{"login":"numpy","id":288276,"avatar_url":"https://avatars.githubusercontent.com/u/288276?v=3","gravatar_id":"","url":"https://api.github.com/users/numpy","html_url":"https://github.com/numpy","followers_url":"https://api.github.com/users/numpy/followers","following_url":"https://api.github.com/users/numpy/following{/other_user}","gists_url":"https://api.github.com/users/numpy/gists{/gist_id}","starred_url":"https://api.github.com/users/numpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numpy/subscriptions","organizations_url":"https://api.github.com/users/numpy/orgs","repos_url":"https://api.github.com/users/numpy/repos","events_url":"https://api.github.com/users/numpy/events{/privacy}","received_events_url":"https://api.github.com/users/numpy/received_events","type":"Organization","site_admin":false},"repo":{"id":908607,"name":"numpy","full_name":"numpy/numpy","owner":{"login":"numpy","id":288276,"avatar_url":"https://avatars.githubusercontent.com/u/288276?v=3","gravatar_id":"","url":"https://api.github.com/users/numpy","html_url":"https://github.com/numpy","followers_url":"https://api.github.com/users/numpy/followers","following_url":"https://api.github.com/users/numpy/following{/other_user}","gists_url":"https://api.github.com/users/numpy/gists{/gist_id}","starred_url":"https://api.github.com/users/numpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numpy/subscriptions","organizations_url":"https://api.github.com/users/numpy/orgs","repos_url":"https://api.github.com/users/numpy/repos","events_url":"https://api.github.com/users/numpy/events{/privacy}","received_events_url":"https://api.github.com/users/numpy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/numpy/numpy","description":"Numpy main repository","fork":false,"url":"https://api.github.com/repos/numpy/numpy","forks_url":"https://api.github.com/repos/numpy/numpy/forks","keys_url":"https://api.github.com/repos/numpy/numpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/numpy/numpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/numpy/numpy/teams","hooks_url":"https://api.github.com/repos/numpy/numpy/hooks","issue_events_url":"https://api.github.com/repos/numpy/numpy/issues/events{/number}","events_url":"https://api.github.com/repos/numpy/numpy/events","assignees_url":"https://api.github.com/repos/numpy/numpy/assignees{/user}","branches_url":"https://api.github.com/repos/numpy/numpy/branches{/branch}","tags_url":"https://api.github.com/repos/numpy/numpy/tags","blobs_url":"https://api.github.com/repos/numpy/numpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/numpy/numpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/numpy/numpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/numpy/numpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/numpy/numpy/statuses/{sha}","languages_url":"https://api.github.com/repos/numpy/numpy/languages","stargazers_url":"https://api.github.com/repos/numpy/numpy/stargazers","contributors_url":"https://api.github.com/repos/numpy/numpy/contributors","subscribers_url":"https://api.github.com/repos/numpy/numpy/subscribers","subscription_url":"https://api.github.com/repos/numpy/numpy/subscription","commits_url":"https://api.github.com/repos/numpy/numpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/numpy/numpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/numpy/numpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/numpy/numpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/numpy/numpy/contents/{+path}","compare_url":"https://api.github.com/repos/numpy/numpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/numpy/numpy/merges","archive_url":"https://api.github.com/repos/numpy/numpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/numpy/numpy/downloads","issues_url":"https://api.github.com/repos/numpy/numpy/issues{/number}","pulls_url":"https://api.github.com/repos/numpy/numpy/pulls{/number}","milestones_url":"https://api.github.com/repos/numpy/numpy/milestones{/number}","notifications_url":"https://api.github.com/repos/numpy/numpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/numpy/numpy/labels{/name}","releases_url":"https://api.github.com/repos/numpy/numpy/releases{/id}","deployments_url":"https://api.github.com/repos/numpy/numpy/deployments","created_at":"2010-09-13T23:02:39Z","updated_at":"2016-09-17T22:30:56Z","pushed_at":"2016-09-18T00:02:51Z","git_url":"git://github.com/numpy/numpy.git","ssh_url":"git@github.com:numpy/numpy.git","clone_url":"https://github.com/numpy/numpy.git","svn_url":"https://github.com/numpy/numpy","homepage":"http://www.numpy.org/","size":80380,"stargazers_count":3346,"watchers_count":3346,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1692,"mirror_url":null,"open_issues_count":1293,"forks":1692,"open_issues":1293,"watchers":3346,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numpy/numpy/pulls/8056"},"html":{"href":"https://github.com/numpy/numpy/pull/8056"},"issue":{"href":"https://api.github.com/repos/numpy/numpy/issues/8056"},"comments":{"href":"https://api.github.com/repos/numpy/numpy/issues/8056/comments"},"review_comments":{"href":"https://api.github.com/repos/numpy/numpy/pulls/8056/comments"},"review_comment":{"href":"https://api.github.com/repos/numpy/numpy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numpy/numpy/pulls/8056/commits"},"statuses":{"href":"https://api.github.com/repos/numpy/numpy/statuses/7544896a34ea98ca9fc5613173966fea23d73f00"}}}}
{"actor":{"display_login":"charris"}}