{"action":"created","comment":{"url":"https://api.github.com/repos/Theano/Theano/pulls/comments/44296976","id":44296976,"diff_hunk":"@@ -4372,7 +4372,7 @@ def infer_shape(self, node, ishapes):\n                     if ele == -1:\n                         requ[i] = missing\n             elif crit == 1:  # we reshape to -1\n-                requ = [mul(*ishapes[0])]\n+                requ = [mul(*ishapes[0])] if ishapes[0] else [1]","path":"theano/tensor/basic.py","position":5,"original_position":5,"commit_id":"a244afd49289b25223b6432706622d8eafe49420","original_commit_id":"a244afd49289b25223b6432706622d8eafe49420","user":{"login":"bouthilx","id":2099418,"avatar_url":"https://avatars.githubusercontent.com/u/2099418?v=3","gravatar_id":"","url":"https://api.github.com/users/bouthilx","html_url":"https://github.com/bouthilx","followers_url":"https://api.github.com/users/bouthilx/followers","following_url":"https://api.github.com/users/bouthilx/following{/other_user}","gists_url":"https://api.github.com/users/bouthilx/gists{/gist_id}","starred_url":"https://api.github.com/users/bouthilx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bouthilx/subscriptions","organizations_url":"https://api.github.com/users/bouthilx/orgs","repos_url":"https://api.github.com/users/bouthilx/repos","events_url":"https://api.github.com/users/bouthilx/events{/privacy}","received_events_url":"https://api.github.com/users/bouthilx/received_events","type":"User","site_admin":false},"body":">I was talking about changing mul() interface do not crash when it get no inputs.\r\n\r\nOh ok. I agree with you not to change mul's interface. It should fail when there is no argument, just as python's ```sum``` does for instance.\r\n\r\n> Can you tell more on what in the Reshape.infer_shape is broken? If it is broken, maybe we should wait for it to be fixed before converting Flatten to Reshape.\r\n\r\nIt's using Shape_i() which makes TestInferShape fail as there is still some Reshapes in shape's graph after optimization. See issue #3420 \r\n\r\n> I don't understand your questions. For scalar (ndim=0), We simply have an empty tuple.\r\n\r\nYep sure. I think I understand now why you say the else cause isn't good. It's because it should be ```[mul(*ishapes[0])] if ishapes[0] else []```, isn't? Otherwise we are turning a scalar into a 1 dimensional vector.","created_at":"2015-11-09T16:41:00Z","updated_at":"2015-11-09T16:41:00Z","html_url":"https://github.com/Theano/Theano/pull/3480#discussion_r44296976","pull_request_url":"https://api.github.com/repos/Theano/Theano/pulls/3480","_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments/44296976"},"html":{"href":"https://github.com/Theano/Theano/pull/3480#discussion_r44296976"},"pull_request":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3480"}}},"pull_request":{"url":"https://api.github.com/repos/Theano/Theano/pulls/3480","id":46587616,"html_url":"https://github.com/Theano/Theano/pull/3480","diff_url":"https://github.com/Theano/Theano/pull/3480.diff","patch_url":"https://github.com/Theano/Theano/pull/3480.patch","issue_url":"https://api.github.com/repos/Theano/Theano/issues/3480","number":3480,"state":"open","locked":false,"title":"Refactor Flatten","user":{"login":"SinaHonari","id":3536552,"avatar_url":"https://avatars.githubusercontent.com/u/3536552?v=3","gravatar_id":"","url":"https://api.github.com/users/SinaHonari","html_url":"https://github.com/SinaHonari","followers_url":"https://api.github.com/users/SinaHonari/followers","following_url":"https://api.github.com/users/SinaHonari/following{/other_user}","gists_url":"https://api.github.com/users/SinaHonari/gists{/gist_id}","starred_url":"https://api.github.com/users/SinaHonari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SinaHonari/subscriptions","organizations_url":"https://api.github.com/users/SinaHonari/orgs","repos_url":"https://api.github.com/users/SinaHonari/repos","events_url":"https://api.github.com/users/SinaHonari/events{/privacy}","received_events_url":"https://api.github.com/users/SinaHonari/received_events","type":"User","site_admin":false},"body":"Fixes issue #950 ","created_at":"2015-10-01T23:02:17Z","updated_at":"2015-11-09T16:41:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1700e7f26f687ac48e9e6aa5cd7ad0751426d44a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Theano/Theano/pulls/3480/commits","review_comments_url":"https://api.github.com/repos/Theano/Theano/pulls/3480/comments","review_comment_url":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/3480/comments","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/a244afd49289b25223b6432706622d8eafe49420","head":{"label":"SinaHonari:issue950","ref":"issue950","sha":"a244afd49289b25223b6432706622d8eafe49420","user":{"login":"SinaHonari","id":3536552,"avatar_url":"https://avatars.githubusercontent.com/u/3536552?v=3","gravatar_id":"","url":"https://api.github.com/users/SinaHonari","html_url":"https://github.com/SinaHonari","followers_url":"https://api.github.com/users/SinaHonari/followers","following_url":"https://api.github.com/users/SinaHonari/following{/other_user}","gists_url":"https://api.github.com/users/SinaHonari/gists{/gist_id}","starred_url":"https://api.github.com/users/SinaHonari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SinaHonari/subscriptions","organizations_url":"https://api.github.com/users/SinaHonari/orgs","repos_url":"https://api.github.com/users/SinaHonari/repos","events_url":"https://api.github.com/users/SinaHonari/events{/privacy}","received_events_url":"https://api.github.com/users/SinaHonari/received_events","type":"User","site_admin":false},"repo":{"id":9309289,"name":"Theano","full_name":"SinaHonari/Theano","owner":{"login":"SinaHonari","id":3536552,"avatar_url":"https://avatars.githubusercontent.com/u/3536552?v=3","gravatar_id":"","url":"https://api.github.com/users/SinaHonari","html_url":"https://github.com/SinaHonari","followers_url":"https://api.github.com/users/SinaHonari/followers","following_url":"https://api.github.com/users/SinaHonari/following{/other_user}","gists_url":"https://api.github.com/users/SinaHonari/gists{/gist_id}","starred_url":"https://api.github.com/users/SinaHonari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SinaHonari/subscriptions","organizations_url":"https://api.github.com/users/SinaHonari/orgs","repos_url":"https://api.github.com/users/SinaHonari/repos","events_url":"https://api.github.com/users/SinaHonari/events{/privacy}","received_events_url":"https://api.github.com/users/SinaHonari/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SinaHonari/Theano","description":"Optimizing GPU-meta-programming code generating array oriented optimizing math compiler in Python","fork":true,"url":"https://api.github.com/repos/SinaHonari/Theano","forks_url":"https://api.github.com/repos/SinaHonari/Theano/forks","keys_url":"https://api.github.com/repos/SinaHonari/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SinaHonari/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SinaHonari/Theano/teams","hooks_url":"https://api.github.com/repos/SinaHonari/Theano/hooks","issue_events_url":"https://api.github.com/repos/SinaHonari/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/SinaHonari/Theano/events","assignees_url":"https://api.github.com/repos/SinaHonari/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/SinaHonari/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/SinaHonari/Theano/tags","blobs_url":"https://api.github.com/repos/SinaHonari/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SinaHonari/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SinaHonari/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/SinaHonari/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SinaHonari/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/SinaHonari/Theano/languages","stargazers_url":"https://api.github.com/repos/SinaHonari/Theano/stargazers","contributors_url":"https://api.github.com/repos/SinaHonari/Theano/contributors","subscribers_url":"https://api.github.com/repos/SinaHonari/Theano/subscribers","subscription_url":"https://api.github.com/repos/SinaHonari/Theano/subscription","commits_url":"https://api.github.com/repos/SinaHonari/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/SinaHonari/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/SinaHonari/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/SinaHonari/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/SinaHonari/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/SinaHonari/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SinaHonari/Theano/merges","archive_url":"https://api.github.com/repos/SinaHonari/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SinaHonari/Theano/downloads","issues_url":"https://api.github.com/repos/SinaHonari/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/SinaHonari/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/SinaHonari/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/SinaHonari/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SinaHonari/Theano/labels{/name}","releases_url":"https://api.github.com/repos/SinaHonari/Theano/releases{/id}","created_at":"2013-04-08T23:46:57Z","updated_at":"2013-04-18T01:28:29Z","pushed_at":"2015-10-30T23:27:38Z","git_url":"git://github.com/SinaHonari/Theano.git","ssh_url":"git@github.com:SinaHonari/Theano.git","clone_url":"https://github.com/SinaHonari/Theano.git","svn_url":"https://github.com/SinaHonari/Theano","homepage":"http://www.deeplearning.net/software/theano","size":44528,"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":"8d3a67b73fda49350d9944c9a24fc9660131861c","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}","created_at":"2011-08-10T03:48:06Z","updated_at":"2015-11-09T16:24:19Z","pushed_at":"2015-11-09T15:43:49Z","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":67416,"stargazers_count":2259,"watchers_count":2259,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":832,"mirror_url":null,"open_issues_count":522,"forks":832,"open_issues":522,"watchers":2259,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3480"},"html":{"href":"https://github.com/Theano/Theano/pull/3480"},"issue":{"href":"https://api.github.com/repos/Theano/Theano/issues/3480"},"comments":{"href":"https://api.github.com/repos/Theano/Theano/issues/3480/comments"},"review_comments":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3480/comments"},"review_comment":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3480/commits"},"statuses":{"href":"https://api.github.com/repos/Theano/Theano/statuses/a244afd49289b25223b6432706622d8eafe49420"}}}}