GitHub PullRequestReviewCommentEvent at 2014-06-13 17:37:26
Repository: Theano
Actor: nouiz
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Theano/Theano/pulls/comments/13762261","id":13762261,"diff_hunk":"@@ -438,3 +441,37 @@ def __str__(self):\n         return self.__class__.__name__\n \n count = Count()\n+\n+\n+class Length(Op):\n+\n+    def __eq__(self, other):\n+        return type(self) == type(other)\n+\n+    def __hash__(self):\n+        return hash(type(self))\n+\n+    def make_node(self, x):\n+        assert isinstance(x.type, TypedListType)\n+        return Apply(self, [x], [T.scalar(dtype='int64')])\n+\n+    def perform(self, node, x, (out, )):\n+        out[0] = numpy.asarray(len(x[0]), 'int64')\n+\n+    def __str__(self):\n+        return self.__class__.__name__\n+\n+    def c_code(self, node, name, inp, out, sub):\n+        x_name = inp[0]\n+        output_name = out[0]\n+        fail = sub['fail']\n+        return \"\"\"\n+        %(output_name)s=(PyArrayObject*)PyArray_ZEROS(0, NULL, NPY_INT64, 0);","path":"theano/typed_list/basic.py","position":39,"original_position":39,"commit_id":"3380676320534e460522faf2ebca8204bd816f4d","original_commit_id":"3380676320534e460522faf2ebca8204bd816f4d","user":{"login":"nouiz","id":180987,"avatar_url":"https://avatars.githubusercontent.com/u/180987?","gravatar_id":"082c34b6c1544c177cb7a66609360089","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":"try PyArray_EMPTY, small speed up.\r\n\r\nAdd the if as the code for shape_i. It is possible that output_name is already allocated.","created_at":"2014-06-13T17:37:26Z","updated_at":"2014-06-13T17:37:26Z","html_url":"https://github.com/Theano/Theano/pull/1917#discussion_r13762261","pull_request_url":"https://api.github.com/repos/Theano/Theano/pulls/1917","_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments/13762261"},"html":{"href":"https://github.com/Theano/Theano/pull/1917#discussion_r13762261"},"pull_request":{"href":"https://api.github.com/repos/Theano/Theano/pulls/1917"}}},"pull_request":{"url":"https://api.github.com/repos/Theano/Theano/pulls/1917","id":17121676,"html_url":"https://github.com/Theano/Theano/pull/1917","diff_url":"https://github.com/Theano/Theano/pull/1917.diff","patch_url":"https://github.com/Theano/Theano/pull/1917.patch","issue_url":"https://api.github.com/repos/Theano/Theano/issues/1917","number":1917,"state":"open","title":"Added Length Op to typed list.","user":{"login":"Hengjean","id":6475943,"avatar_url":"https://avatars.githubusercontent.com/u/6475943?","gravatar_id":"d84c09ac686ef6362a2f731695adecf5","url":"https://api.github.com/users/Hengjean","html_url":"https://github.com/Hengjean","followers_url":"https://api.github.com/users/Hengjean/followers","following_url":"https://api.github.com/users/Hengjean/following{/other_user}","gists_url":"https://api.github.com/users/Hengjean/gists{/gist_id}","starred_url":"https://api.github.com/users/Hengjean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hengjean/subscriptions","organizations_url":"https://api.github.com/users/Hengjean/orgs","repos_url":"https://api.github.com/users/Hengjean/repos","events_url":"https://api.github.com/users/Hengjean/events{/privacy}","received_events_url":"https://api.github.com/users/Hengjean/received_events","type":"User","site_admin":false},"body":"Added Length OP. New tests were passing the nightly build.","created_at":"2014-06-13T17:32:58Z","updated_at":"2014-06-13T17:37:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"735b80d753687015e21ab0eec8725a3508cd94e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Theano/Theano/pulls/1917/commits","review_comments_url":"https://api.github.com/repos/Theano/Theano/pulls/1917/comments","review_comment_url":"https://api.github.com/repos/Theano/Theano/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/1917/comments","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/3380676320534e460522faf2ebca8204bd816f4d","head":{"label":"Hengjean:TypedListLength","ref":"TypedListLength","sha":"3380676320534e460522faf2ebca8204bd816f4d","user":{"login":"Hengjean","id":6475943,"avatar_url":"https://avatars.githubusercontent.com/u/6475943?","gravatar_id":"d84c09ac686ef6362a2f731695adecf5","url":"https://api.github.com/users/Hengjean","html_url":"https://github.com/Hengjean","followers_url":"https://api.github.com/users/Hengjean/followers","following_url":"https://api.github.com/users/Hengjean/following{/other_user}","gists_url":"https://api.github.com/users/Hengjean/gists{/gist_id}","starred_url":"https://api.github.com/users/Hengjean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hengjean/subscriptions","organizations_url":"https://api.github.com/users/Hengjean/orgs","repos_url":"https://api.github.com/users/Hengjean/repos","events_url":"https://api.github.com/users/Hengjean/events{/privacy}","received_events_url":"https://api.github.com/users/Hengjean/received_events","type":"User","site_admin":false},"repo":{"id":19503953,"name":"Theano","full_name":"Hengjean/Theano","owner":{"login":"Hengjean","id":6475943,"avatar_url":"https://avatars.githubusercontent.com/u/6475943?","gravatar_id":"d84c09ac686ef6362a2f731695adecf5","url":"https://api.github.com/users/Hengjean","html_url":"https://github.com/Hengjean","followers_url":"https://api.github.com/users/Hengjean/followers","following_url":"https://api.github.com/users/Hengjean/following{/other_user}","gists_url":"https://api.github.com/users/Hengjean/gists{/gist_id}","starred_url":"https://api.github.com/users/Hengjean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hengjean/subscriptions","organizations_url":"https://api.github.com/users/Hengjean/orgs","repos_url":"https://api.github.com/users/Hengjean/repos","events_url":"https://api.github.com/users/Hengjean/events{/privacy}","received_events_url":"https://api.github.com/users/Hengjean/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Hengjean/Theano","description":"Optimizing GPU-meta-programming code generating array oriented optimizing math compiler in Python","fork":true,"url":"https://api.github.com/repos/Hengjean/Theano","forks_url":"https://api.github.com/repos/Hengjean/Theano/forks","keys_url":"https://api.github.com/repos/Hengjean/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hengjean/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hengjean/Theano/teams","hooks_url":"https://api.github.com/repos/Hengjean/Theano/hooks","issue_events_url":"https://api.github.com/repos/Hengjean/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/Hengjean/Theano/events","assignees_url":"https://api.github.com/repos/Hengjean/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/Hengjean/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/Hengjean/Theano/tags","blobs_url":"https://api.github.com/repos/Hengjean/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hengjean/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hengjean/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hengjean/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hengjean/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/Hengjean/Theano/languages","stargazers_url":"https://api.github.com/repos/Hengjean/Theano/stargazers","contributors_url":"https://api.github.com/repos/Hengjean/Theano/contributors","subscribers_url":"https://api.github.com/repos/Hengjean/Theano/subscribers","subscription_url":"https://api.github.com/repos/Hengjean/Theano/subscription","commits_url":"https://api.github.com/repos/Hengjean/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hengjean/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hengjean/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hengjean/Theano/issues/comments/{number}","contents_url":"https://api.github.com/repos/Hengjean/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/Hengjean/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hengjean/Theano/merges","archive_url":"https://api.github.com/repos/Hengjean/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hengjean/Theano/downloads","issues_url":"https://api.github.com/repos/Hengjean/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/Hengjean/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/Hengjean/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/Hengjean/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hengjean/Theano/labels{/name}","releases_url":"https://api.github.com/repos/Hengjean/Theano/releases{/id}","created_at":"2014-05-06T17:35:59Z","updated_at":"2014-06-13T17:32:58Z","pushed_at":"2014-06-13T17:32:17Z","git_url":"git://github.com/Hengjean/Theano.git","ssh_url":"git@github.com:Hengjean/Theano.git","clone_url":"https://github.com/Hengjean/Theano.git","svn_url":"https://github.com/Hengjean/Theano","homepage":"http://www.deeplearning.net/software/theano","size":20533,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"de8c4a4c7e56785295339c5b3c18cfa74e6b81f9","user":{"login":"Theano","id":970517,"avatar_url":"https://avatars.githubusercontent.com/u/970517?","gravatar_id":"f2c9cd1d69fe2fb37115161c5b1e1708","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?","gravatar_id":"f2c9cd1d69fe2fb37115161c5b1e1708","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":"Optimizing GPU-meta-programming code generating array oriented optimizing math compiler in Python","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}","created_at":"2011-08-10T03:48:06Z","updated_at":"2014-06-13T16:42:53Z","pushed_at":"2014-06-13T16:27:21Z","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":33529,"stargazers_count":651,"watchers_count":651,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":227,"mirror_url":null,"open_issues_count":222,"forks":227,"open_issues":222,"watchers":651,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/1917"},"html":{"href":"https://github.com/Theano/Theano/pull/1917"},"issue":{"href":"https://api.github.com/repos/Theano/Theano/issues/1917"},"comments":{"href":"https://api.github.com/repos/Theano/Theano/issues/1917/comments"},"review_comments":{"href":"https://api.github.com/repos/Theano/Theano/pulls/1917/comments"},"review_comment":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Theano/Theano/pulls/1917/commits"},"statuses":{"href":"https://api.github.com/repos/Theano/Theano/statuses/3380676320534e460522faf2ebca8204bd816f4d"}}}}