{"action":"created","comment":{"url":"https://api.github.com/repos/numpy/numpy/pulls/comments/43698642","id":43698642,"diff_hunk":"@@ -4460,8 +4460,8 @@ cdef class RandomState:\n \n         A loaded dice is more likely to land on number 6:\n \n-        >>> np.random.multinomial(100, [1/7.]*5)\n-        array([13, 16, 13, 16, 42])\n+        >>> np.random.multinomial(100, [1/7.]*6)","path":"numpy/random/mtrand/mtrand.pyx","position":6,"original_position":6,"commit_id":"ea9e4709c24f66b680eecfd184095bcecede7df4","original_commit_id":"ea9e4709c24f66b680eecfd184095bcecede7df4","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":">Yes, examples are not deterministic (are they anywhere in numpy?)\r\n\r\nI was musing that if we ever start testing docstrings there is going to be a problem.","created_at":"2015-11-02T23:23:41Z","updated_at":"2015-11-02T23:23:41Z","html_url":"https://github.com/numpy/numpy/pull/6612#discussion_r43698642","pull_request_url":"https://api.github.com/repos/numpy/numpy/pulls/6612","_links":{"self":{"href":"https://api.github.com/repos/numpy/numpy/pulls/comments/43698642"},"html":{"href":"https://github.com/numpy/numpy/pull/6612#discussion_r43698642"},"pull_request":{"href":"https://api.github.com/repos/numpy/numpy/pulls/6612"}}},"pull_request":{"url":"https://api.github.com/repos/numpy/numpy/pulls/6612","id":49427551,"html_url":"https://github.com/numpy/numpy/pull/6612","diff_url":"https://github.com/numpy/numpy/pull/6612.diff","patch_url":"https://github.com/numpy/numpy/pull/6612.patch","issue_url":"https://api.github.com/repos/numpy/numpy/issues/6612","number":6612,"state":"open","locked":false,"title":"DOC: typo in the docstring of `random.multinomial`","user":{"login":"ev-br","id":2133832,"avatar_url":"https://avatars.githubusercontent.com/u/2133832?v=3","gravatar_id":"","url":"https://api.github.com/users/ev-br","html_url":"https://github.com/ev-br","followers_url":"https://api.github.com/users/ev-br/followers","following_url":"https://api.github.com/users/ev-br/following{/other_user}","gists_url":"https://api.github.com/users/ev-br/gists{/gist_id}","starred_url":"https://api.github.com/users/ev-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev-br/subscriptions","organizations_url":"https://api.github.com/users/ev-br/orgs","repos_url":"https://api.github.com/users/ev-br/repos","events_url":"https://api.github.com/users/ev-br/events{/privacy}","received_events_url":"https://api.github.com/users/ev-br/received_events","type":"User","site_admin":false},"body":"The last example in the docstring of np.random.multinomial is a bit confusing: it talks about a \"loaded dice\" but draws variates from a five-element distribution. \r\n\r\nIt seems to me that the example was supposed to demonstrate the convention that the last element of the `pvals` array is modified to make the probabilities sum to one:\r\n\r\n```\r\nIn [26]: rndm = np.random.RandomState(1234)\r\n\r\nIn [27]: rndm.multinomial(1000, [1/7.]*6)\r\nOut[27]: array([137, 142, 148, 136, 164, 273])\r\n\r\nIn [28]: rndm = np.random.RandomState(1234)\r\n\r\nIn [29]: rndm.multinomial(1000, [1/7.]*5 + [2/7.])\r\nOut[29]: array([137, 142, 148, 136, 164, 273])\r\n```\r\n\r\n\r\nHence modify the docstring to match the code. \r\n\r\n[ci skip]\r\n","created_at":"2015-11-02T12:47:59Z","updated_at":"2015-11-02T23:23:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19158ce80a19b86d7b6f455d1ee029c40cb046e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/numpy/numpy/pulls/6612/commits","review_comments_url":"https://api.github.com/repos/numpy/numpy/pulls/6612/comments","review_comment_url":"https://api.github.com/repos/numpy/numpy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/6612/comments","statuses_url":"https://api.github.com/repos/numpy/numpy/statuses/ea9e4709c24f66b680eecfd184095bcecede7df4","head":{"label":"ev-br:patch-1","ref":"patch-1","sha":"ea9e4709c24f66b680eecfd184095bcecede7df4","user":{"login":"ev-br","id":2133832,"avatar_url":"https://avatars.githubusercontent.com/u/2133832?v=3","gravatar_id":"","url":"https://api.github.com/users/ev-br","html_url":"https://github.com/ev-br","followers_url":"https://api.github.com/users/ev-br/followers","following_url":"https://api.github.com/users/ev-br/following{/other_user}","gists_url":"https://api.github.com/users/ev-br/gists{/gist_id}","starred_url":"https://api.github.com/users/ev-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev-br/subscriptions","organizations_url":"https://api.github.com/users/ev-br/orgs","repos_url":"https://api.github.com/users/ev-br/repos","events_url":"https://api.github.com/users/ev-br/events{/privacy}","received_events_url":"https://api.github.com/users/ev-br/received_events","type":"User","site_admin":false},"repo":{"id":45295770,"name":"numpy","full_name":"ev-br/numpy","owner":{"login":"ev-br","id":2133832,"avatar_url":"https://avatars.githubusercontent.com/u/2133832?v=3","gravatar_id":"","url":"https://api.github.com/users/ev-br","html_url":"https://github.com/ev-br","followers_url":"https://api.github.com/users/ev-br/followers","following_url":"https://api.github.com/users/ev-br/following{/other_user}","gists_url":"https://api.github.com/users/ev-br/gists{/gist_id}","starred_url":"https://api.github.com/users/ev-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev-br/subscriptions","organizations_url":"https://api.github.com/users/ev-br/orgs","repos_url":"https://api.github.com/users/ev-br/repos","events_url":"https://api.github.com/users/ev-br/events{/privacy}","received_events_url":"https://api.github.com/users/ev-br/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ev-br/numpy","description":"Numpy main repository","fork":true,"url":"https://api.github.com/repos/ev-br/numpy","forks_url":"https://api.github.com/repos/ev-br/numpy/forks","keys_url":"https://api.github.com/repos/ev-br/numpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ev-br/numpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ev-br/numpy/teams","hooks_url":"https://api.github.com/repos/ev-br/numpy/hooks","issue_events_url":"https://api.github.com/repos/ev-br/numpy/issues/events{/number}","events_url":"https://api.github.com/repos/ev-br/numpy/events","assignees_url":"https://api.github.com/repos/ev-br/numpy/assignees{/user}","branches_url":"https://api.github.com/repos/ev-br/numpy/branches{/branch}","tags_url":"https://api.github.com/repos/ev-br/numpy/tags","blobs_url":"https://api.github.com/repos/ev-br/numpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ev-br/numpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ev-br/numpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/ev-br/numpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ev-br/numpy/statuses/{sha}","languages_url":"https://api.github.com/repos/ev-br/numpy/languages","stargazers_url":"https://api.github.com/repos/ev-br/numpy/stargazers","contributors_url":"https://api.github.com/repos/ev-br/numpy/contributors","subscribers_url":"https://api.github.com/repos/ev-br/numpy/subscribers","subscription_url":"https://api.github.com/repos/ev-br/numpy/subscription","commits_url":"https://api.github.com/repos/ev-br/numpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/ev-br/numpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/ev-br/numpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/ev-br/numpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/ev-br/numpy/contents/{+path}","compare_url":"https://api.github.com/repos/ev-br/numpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ev-br/numpy/merges","archive_url":"https://api.github.com/repos/ev-br/numpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ev-br/numpy/downloads","issues_url":"https://api.github.com/repos/ev-br/numpy/issues{/number}","pulls_url":"https://api.github.com/repos/ev-br/numpy/pulls{/number}","milestones_url":"https://api.github.com/repos/ev-br/numpy/milestones{/number}","notifications_url":"https://api.github.com/repos/ev-br/numpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ev-br/numpy/labels{/name}","releases_url":"https://api.github.com/repos/ev-br/numpy/releases{/id}","created_at":"2015-10-31T09:17:45Z","updated_at":"2015-10-31T09:17:55Z","pushed_at":"2015-11-02T22:27:08Z","git_url":"git://github.com/ev-br/numpy.git","ssh_url":"git@github.com:ev-br/numpy.git","clone_url":"https://github.com/ev-br/numpy.git","svn_url":"https://github.com/ev-br/numpy","homepage":"http://www.numpy.org/","size":42318,"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":"numpy:master","ref":"master","sha":"80abf6ebf89c2ccececafc25238716ac13f0019e","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}","created_at":"2010-09-13T23:02:39Z","updated_at":"2015-11-02T14:18:26Z","pushed_at":"2015-11-02T20:10:56Z","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":88336,"stargazers_count":2284,"watchers_count":2284,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1189,"mirror_url":null,"open_issues_count":1024,"forks":1189,"open_issues":1024,"watchers":2284,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numpy/numpy/pulls/6612"},"html":{"href":"https://github.com/numpy/numpy/pull/6612"},"issue":{"href":"https://api.github.com/repos/numpy/numpy/issues/6612"},"comments":{"href":"https://api.github.com/repos/numpy/numpy/issues/6612/comments"},"review_comments":{"href":"https://api.github.com/repos/numpy/numpy/pulls/6612/comments"},"review_comment":{"href":"https://api.github.com/repos/numpy/numpy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numpy/numpy/pulls/6612/commits"},"statuses":{"href":"https://api.github.com/repos/numpy/numpy/statuses/ea9e4709c24f66b680eecfd184095bcecede7df4"}}}}