{"action":"created","comment":{"url":"https://api.github.com/repos/Theano/Theano/pulls/comments/51372277","id":51372277,"diff_hunk":"@@ -192,6 +192,181 @@ def perform(self, node, ins, outs):\n                             z[0][n, m] += 1\n                             break\n \n+class WeightedSelectionFromUniform(Op):\n+    \"\"\"\n+    Converts samples from a uniform into sample from a multinomial.\n+\n+    \"\"\"\n+\n+    __props__ = (\"odtype\",)\n+\n+    def __init__(self, odtype):\n+        self.odtype = odtype\n+\n+    def __str__(self):\n+        return '%s{%s}' % (self.__class__.__name__, self.odtype)\n+\n+    def __setstate__(self, dct):","path":"theano/sandbox/multinomial.py","position":18,"original_position":18,"commit_id":"5a42421f176d8ed0595b84f6249857d2f82e64b4","original_commit_id":"5a42421f176d8ed0595b84f6249857d2f82e64b4","user":{"login":"nouiz","id":180987,"avatar_url":"https://avatars.githubusercontent.com/u/180987?v=3","gravatar_id":"","url":"https://api.github.com/users/nouiz","html_url":"https://github.com/nouiz","followers_url":"https://api.github.com/users/nouiz/followers","following_url":"https://api.github.com/users/nouiz/following{/other_user}","gists_url":"https://api.github.com/users/nouiz/gists{/gist_id}","starred_url":"https://api.github.com/users/nouiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nouiz/subscriptions","organizations_url":"https://api.github.com/users/nouiz/orgs","repos_url":"https://api.github.com/users/nouiz/repos","events_url":"https://api.github.com/users/nouiz/events{/privacy}","received_events_url":"https://api.github.com/users/nouiz/received_events","type":"User","site_admin":false},"body":"delete this method, it isn't useful. Idem for `__str__`.","created_at":"2016-02-01T01:26:17Z","updated_at":"2016-02-01T01:26:17Z","html_url":"https://github.com/Theano/Theano/pull/3950#discussion_r51372277","pull_request_url":"https://api.github.com/repos/Theano/Theano/pulls/3950","_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments/51372277"},"html":{"href":"https://github.com/Theano/Theano/pull/3950#discussion_r51372277"},"pull_request":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3950"}}},"pull_request":{"url":"https://api.github.com/repos/Theano/Theano/pulls/3950","id":57708369,"html_url":"https://github.com/Theano/Theano/pull/3950","diff_url":"https://github.com/Theano/Theano/pull/3950.diff","patch_url":"https://github.com/Theano/Theano/pull/3950.patch","issue_url":"https://api.github.com/repos/Theano/Theano/issues/3950","number":3950,"state":"open","locked":false,"title":"C implementation of sample without replacement OP","user":{"login":"aalmah","id":862408,"avatar_url":"https://avatars.githubusercontent.com/u/862408?v=3","gravatar_id":"","url":"https://api.github.com/users/aalmah","html_url":"https://github.com/aalmah","followers_url":"https://api.github.com/users/aalmah/followers","following_url":"https://api.github.com/users/aalmah/following{/other_user}","gists_url":"https://api.github.com/users/aalmah/gists{/gist_id}","starred_url":"https://api.github.com/users/aalmah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aalmah/subscriptions","organizations_url":"https://api.github.com/users/aalmah/orgs","repos_url":"https://api.github.com/users/aalmah/repos","events_url":"https://api.github.com/users/aalmah/events{/privacy}","received_events_url":"https://api.github.com/users/aalmah/received_events","type":"User","site_admin":false},"body":"Addressing #3143. One test is still failing but I made a PR for reference.","created_at":"2016-01-29T21:56:21Z","updated_at":"2016-02-01T01:26:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c858fcf6d03c33e7f76a54dd810084d47691b60c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Theano/Theano/pulls/3950/commits","review_comments_url":"https://api.github.com/repos/Theano/Theano/pulls/3950/comments","review_comment_url":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/3950/comments","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/5a42421f176d8ed0595b84f6249857d2f82e64b4","head":{"label":"aalmah:rand_weighted_select_c_impl","ref":"rand_weighted_select_c_impl","sha":"5a42421f176d8ed0595b84f6249857d2f82e64b4","user":{"login":"aalmah","id":862408,"avatar_url":"https://avatars.githubusercontent.com/u/862408?v=3","gravatar_id":"","url":"https://api.github.com/users/aalmah","html_url":"https://github.com/aalmah","followers_url":"https://api.github.com/users/aalmah/followers","following_url":"https://api.github.com/users/aalmah/following{/other_user}","gists_url":"https://api.github.com/users/aalmah/gists{/gist_id}","starred_url":"https://api.github.com/users/aalmah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aalmah/subscriptions","organizations_url":"https://api.github.com/users/aalmah/orgs","repos_url":"https://api.github.com/users/aalmah/repos","events_url":"https://api.github.com/users/aalmah/events{/privacy}","received_events_url":"https://api.github.com/users/aalmah/received_events","type":"User","site_admin":false},"repo":{"id":16921707,"name":"Theano","full_name":"aalmah/Theano","owner":{"login":"aalmah","id":862408,"avatar_url":"https://avatars.githubusercontent.com/u/862408?v=3","gravatar_id":"","url":"https://api.github.com/users/aalmah","html_url":"https://github.com/aalmah","followers_url":"https://api.github.com/users/aalmah/followers","following_url":"https://api.github.com/users/aalmah/following{/other_user}","gists_url":"https://api.github.com/users/aalmah/gists{/gist_id}","starred_url":"https://api.github.com/users/aalmah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aalmah/subscriptions","organizations_url":"https://api.github.com/users/aalmah/orgs","repos_url":"https://api.github.com/users/aalmah/repos","events_url":"https://api.github.com/users/aalmah/events{/privacy}","received_events_url":"https://api.github.com/users/aalmah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aalmah/Theano","description":"Optimizing GPU-meta-programming code generating array oriented optimizing math compiler in Python","fork":true,"url":"https://api.github.com/repos/aalmah/Theano","forks_url":"https://api.github.com/repos/aalmah/Theano/forks","keys_url":"https://api.github.com/repos/aalmah/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aalmah/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aalmah/Theano/teams","hooks_url":"https://api.github.com/repos/aalmah/Theano/hooks","issue_events_url":"https://api.github.com/repos/aalmah/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/aalmah/Theano/events","assignees_url":"https://api.github.com/repos/aalmah/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/aalmah/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/aalmah/Theano/tags","blobs_url":"https://api.github.com/repos/aalmah/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aalmah/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aalmah/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/aalmah/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aalmah/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/aalmah/Theano/languages","stargazers_url":"https://api.github.com/repos/aalmah/Theano/stargazers","contributors_url":"https://api.github.com/repos/aalmah/Theano/contributors","subscribers_url":"https://api.github.com/repos/aalmah/Theano/subscribers","subscription_url":"https://api.github.com/repos/aalmah/Theano/subscription","commits_url":"https://api.github.com/repos/aalmah/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/aalmah/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/aalmah/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/aalmah/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/aalmah/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/aalmah/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aalmah/Theano/merges","archive_url":"https://api.github.com/repos/aalmah/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aalmah/Theano/downloads","issues_url":"https://api.github.com/repos/aalmah/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/aalmah/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/aalmah/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/aalmah/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aalmah/Theano/labels{/name}","releases_url":"https://api.github.com/repos/aalmah/Theano/releases{/id}","deployments_url":"https://api.github.com/repos/aalmah/Theano/deployments","created_at":"2014-02-17T18:06:13Z","updated_at":"2015-04-02T13:53:17Z","pushed_at":"2016-01-29T21:39:03Z","git_url":"git://github.com/aalmah/Theano.git","ssh_url":"git@github.com:aalmah/Theano.git","clone_url":"https://github.com/aalmah/Theano.git","svn_url":"https://github.com/aalmah/Theano","homepage":"http://www.deeplearning.net/software/theano","size":47816,"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":"Theano:master","ref":"master","sha":"18319b8f426e99fa209c4910af7208c0d51c41a6","user":{"login":"Theano","id":970517,"avatar_url":"https://avatars.githubusercontent.com/u/970517?v=3","gravatar_id":"","url":"https://api.github.com/users/Theano","html_url":"https://github.com/Theano","followers_url":"https://api.github.com/users/Theano/followers","following_url":"https://api.github.com/users/Theano/following{/other_user}","gists_url":"https://api.github.com/users/Theano/gists{/gist_id}","starred_url":"https://api.github.com/users/Theano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Theano/subscriptions","organizations_url":"https://api.github.com/users/Theano/orgs","repos_url":"https://api.github.com/users/Theano/repos","events_url":"https://api.github.com/users/Theano/events{/privacy}","received_events_url":"https://api.github.com/users/Theano/received_events","type":"Organization","site_admin":false},"repo":{"id":2183193,"name":"Theano","full_name":"Theano/Theano","owner":{"login":"Theano","id":970517,"avatar_url":"https://avatars.githubusercontent.com/u/970517?v=3","gravatar_id":"","url":"https://api.github.com/users/Theano","html_url":"https://github.com/Theano","followers_url":"https://api.github.com/users/Theano/followers","following_url":"https://api.github.com/users/Theano/following{/other_user}","gists_url":"https://api.github.com/users/Theano/gists{/gist_id}","starred_url":"https://api.github.com/users/Theano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Theano/subscriptions","organizations_url":"https://api.github.com/users/Theano/orgs","repos_url":"https://api.github.com/users/Theano/repos","events_url":"https://api.github.com/users/Theano/events{/privacy}","received_events_url":"https://api.github.com/users/Theano/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Theano/Theano","description":"Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.","fork":false,"url":"https://api.github.com/repos/Theano/Theano","forks_url":"https://api.github.com/repos/Theano/Theano/forks","keys_url":"https://api.github.com/repos/Theano/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Theano/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Theano/Theano/teams","hooks_url":"https://api.github.com/repos/Theano/Theano/hooks","issue_events_url":"https://api.github.com/repos/Theano/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/Theano/Theano/events","assignees_url":"https://api.github.com/repos/Theano/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/Theano/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/Theano/Theano/tags","blobs_url":"https://api.github.com/repos/Theano/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Theano/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Theano/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/Theano/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/Theano/Theano/languages","stargazers_url":"https://api.github.com/repos/Theano/Theano/stargazers","contributors_url":"https://api.github.com/repos/Theano/Theano/contributors","subscribers_url":"https://api.github.com/repos/Theano/Theano/subscribers","subscription_url":"https://api.github.com/repos/Theano/Theano/subscription","commits_url":"https://api.github.com/repos/Theano/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/Theano/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/Theano/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/Theano/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/Theano/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/Theano/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Theano/Theano/merges","archive_url":"https://api.github.com/repos/Theano/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Theano/Theano/downloads","issues_url":"https://api.github.com/repos/Theano/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/Theano/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/Theano/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/Theano/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Theano/Theano/labels{/name}","releases_url":"https://api.github.com/repos/Theano/Theano/releases{/id}","deployments_url":"https://api.github.com/repos/Theano/Theano/deployments","created_at":"2011-08-10T03:48:06Z","updated_at":"2016-01-31T22:19:22Z","pushed_at":"2016-02-01T01:08:33Z","git_url":"git://github.com/Theano/Theano.git","ssh_url":"git@github.com:Theano/Theano.git","clone_url":"https://github.com/Theano/Theano.git","svn_url":"https://github.com/Theano/Theano","homepage":"http://www.deeplearning.net/software/theano","size":56466,"stargazers_count":2901,"watchers_count":2901,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1041,"mirror_url":null,"open_issues_count":581,"forks":1041,"open_issues":581,"watchers":2901,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3950"},"html":{"href":"https://github.com/Theano/Theano/pull/3950"},"issue":{"href":"https://api.github.com/repos/Theano/Theano/issues/3950"},"comments":{"href":"https://api.github.com/repos/Theano/Theano/issues/3950/comments"},"review_comments":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3950/comments"},"review_comment":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3950/commits"},"statuses":{"href":"https://api.github.com/repos/Theano/Theano/statuses/5a42421f176d8ed0595b84f6249857d2f82e64b4"}}}}