{"action":"opened","issue":{"url":"https://api.github.com/repos/Theano/Theano/issues/3722","labels_url":"https://api.github.com/repos/Theano/Theano/issues/3722/labels{/name}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/3722/comments","events_url":"https://api.github.com/repos/Theano/Theano/issues/3722/events","html_url":"https://github.com/Theano/Theano/issues/3722","id":119853002,"number":3722,"title":"Wrong result when iterating over symbolic shapes","user":{"login":"lamblin","id":178249,"avatar_url":"https://avatars.githubusercontent.com/u/178249?v=3","gravatar_id":"","url":"https://api.github.com/users/lamblin","html_url":"https://github.com/lamblin","followers_url":"https://api.github.com/users/lamblin/followers","following_url":"https://api.github.com/users/lamblin/following{/other_user}","gists_url":"https://api.github.com/users/lamblin/gists{/gist_id}","starred_url":"https://api.github.com/users/lamblin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamblin/subscriptions","organizations_url":"https://api.github.com/users/lamblin/orgs","repos_url":"https://api.github.com/users/lamblin/repos","events_url":"https://api.github.com/users/lamblin/events{/privacy}","received_events_url":"https://api.github.com/users/lamblin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Theano/Theano/labels/Bug","name":"Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-02T02:26:13Z","updated_at":"2015-12-02T02:26:13Z","closed_at":null,"body":"Some slices are not correctly handled when we try to extract all scalar elements of a symbolic shape after a subtensor:\r\n```python\r\n>>> x = theano.shared(np.zeros((2,3,4,5), dtype='float32'))\r\n>>> list(x.shape)  # OK\r\n[Subtensor{int64}.0,\r\n Subtensor{int64}.0,\r\n Subtensor{int64}.0,\r\n Subtensor{int64}.0]\r\n>>> list(x.shape[2:4])  # OK\r\n[Subtensor{int64}.0, Subtensor{int64}.0]\r\n>>> list(x.shape[2:])  # BUG\r\n[]\r\n```\r\nI think the previous behaviour was to raise an Exception in the last 2 cases."}}