{"action":"created","comment":{"url":"https://api.github.com/repos/Theano/Theano/pulls/comments/44411224","id":44411224,"diff_hunk":"@@ -4717,6 +4717,23 @@ def test_broadcast2(self):\n         vy = numpy.array([[7, 8, 9], [10, 11, 12]], dtype='int64')\n         assert numpy.all(f(vx, vy) == vy)\n \n+    def test_broadcast3(self):\n+        # test switch(matrix, vector, same_vector)\n+\n+        # This case is not optimized for now.\n+        x = theano.tensor.matrix('x', dtype='int32')\n+        y = theano.tensor.vector('y', dtype='int64')\n+        z = theano.tensor.switch(x, y, y)\n+        f = theano.function([x, y], z, mode=self.mode)\n+        vx = numpy.array([[0, 1], [1, 0]], dtype='int32')\n+        vy = numpy.array([7, 8], dtype='int64')\n+        utt.assert_allclose(f(vx, vy), numpy.where(vx, vy, vy))#[[7, 8], [8, 7]])\n+        theano.printing.debugprint(f)","path":"theano/tensor/tests/test_opt.py","position":24,"original_position":24,"commit_id":"f77a8b61d8d0059d964c41df359fb9e789b1be40","original_commit_id":"f77a8b61d8d0059d964c41df359fb9e789b1be40","user":{"login":"carriepl","id":832811,"avatar_url":"https://avatars.githubusercontent.com/u/832811?v=3","gravatar_id":"","url":"https://api.github.com/users/carriepl","html_url":"https://github.com/carriepl","followers_url":"https://api.github.com/users/carriepl/followers","following_url":"https://api.github.com/users/carriepl/following{/other_user}","gists_url":"https://api.github.com/users/carriepl/gists{/gist_id}","starred_url":"https://api.github.com/users/carriepl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carriepl/subscriptions","organizations_url":"https://api.github.com/users/carriepl/orgs","repos_url":"https://api.github.com/users/carriepl/repos","events_url":"https://api.github.com/users/carriepl/events{/privacy}","received_events_url":"https://api.github.com/users/carriepl/received_events","type":"User","site_admin":false},"body":"That debugprint should be removed","created_at":"2015-11-10T14:27:23Z","updated_at":"2015-11-10T14:27:23Z","html_url":"https://github.com/Theano/Theano/pull/3619#discussion_r44411224","pull_request_url":"https://api.github.com/repos/Theano/Theano/pulls/3619","_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments/44411224"},"html":{"href":"https://github.com/Theano/Theano/pull/3619#discussion_r44411224"},"pull_request":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3619"}}},"pull_request":{"url":"https://api.github.com/repos/Theano/Theano/pulls/3619","id":50258769,"html_url":"https://github.com/Theano/Theano/pull/3619","diff_url":"https://github.com/Theano/Theano/pull/3619.diff","patch_url":"https://github.com/Theano/Theano/pull/3619.patch","issue_url":"https://api.github.com/repos/Theano/Theano/issues/3619","number":3619,"state":"open","locked":false,"title":"fix gh-3614, fix switch opt when both branch are the same and we broa…","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":"…dcast the condition. Implement it in an optimized way","created_at":"2015-11-10T14:20:12Z","updated_at":"2015-11-10T14:27:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c87c1ccf01fedcb2670857c4927e08c1b53b170e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Theano/Theano/pulls/3619/commits","review_comments_url":"https://api.github.com/repos/Theano/Theano/pulls/3619/comments","review_comment_url":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/3619/comments","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/f77a8b61d8d0059d964c41df359fb9e789b1be40","head":{"label":"nouiz:switch_opt","ref":"switch_opt","sha":"f77a8b61d8d0059d964c41df359fb9e789b1be40","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},"repo":{"id":2255296,"name":"Theano","full_name":"nouiz/Theano","owner":{"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},"private":false,"html_url":"https://github.com/nouiz/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":true,"url":"https://api.github.com/repos/nouiz/Theano","forks_url":"https://api.github.com/repos/nouiz/Theano/forks","keys_url":"https://api.github.com/repos/nouiz/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nouiz/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nouiz/Theano/teams","hooks_url":"https://api.github.com/repos/nouiz/Theano/hooks","issue_events_url":"https://api.github.com/repos/nouiz/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/nouiz/Theano/events","assignees_url":"https://api.github.com/repos/nouiz/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/nouiz/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/nouiz/Theano/tags","blobs_url":"https://api.github.com/repos/nouiz/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nouiz/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nouiz/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/nouiz/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nouiz/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/nouiz/Theano/languages","stargazers_url":"https://api.github.com/repos/nouiz/Theano/stargazers","contributors_url":"https://api.github.com/repos/nouiz/Theano/contributors","subscribers_url":"https://api.github.com/repos/nouiz/Theano/subscribers","subscription_url":"https://api.github.com/repos/nouiz/Theano/subscription","commits_url":"https://api.github.com/repos/nouiz/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/nouiz/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/nouiz/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/nouiz/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/nouiz/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/nouiz/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nouiz/Theano/merges","archive_url":"https://api.github.com/repos/nouiz/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nouiz/Theano/downloads","issues_url":"https://api.github.com/repos/nouiz/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/nouiz/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/nouiz/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/nouiz/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nouiz/Theano/labels{/name}","releases_url":"https://api.github.com/repos/nouiz/Theano/releases{/id}","created_at":"2011-08-23T13:23:37Z","updated_at":"2015-05-09T01:09:56Z","pushed_at":"2015-11-10T14:19:57Z","git_url":"git://github.com/nouiz/Theano.git","ssh_url":"git@github.com:nouiz/Theano.git","clone_url":"https://github.com/nouiz/Theano.git","svn_url":"https://github.com/nouiz/Theano","homepage":"http://www.deeplearning.net/software/theano","size":50100,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"Theano:master","ref":"master","sha":"29732d84288f991fb9da8453b27c07f7e7a81287","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-10T13:49:17Z","pushed_at":"2015-11-10T14:20:14Z","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":67781,"stargazers_count":2289,"watchers_count":2289,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":835,"mirror_url":null,"open_issues_count":521,"forks":835,"open_issues":521,"watchers":2289,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3619"},"html":{"href":"https://github.com/Theano/Theano/pull/3619"},"issue":{"href":"https://api.github.com/repos/Theano/Theano/issues/3619"},"comments":{"href":"https://api.github.com/repos/Theano/Theano/issues/3619/comments"},"review_comments":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3619/comments"},"review_comment":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3619/commits"},"statuses":{"href":"https://api.github.com/repos/Theano/Theano/statuses/f77a8b61d8d0059d964c41df359fb9e789b1be40"}}}}